traffic learner: avoid truncated output files on error
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Fri, 19 Oct 2018 03:39:36 +0000 (16:39 +1300)
committerDouglas Bagnall <dbagnall@samba.org>
Tue, 8 Jan 2019 22:55:32 +0000 (23:55 +0100)
commitd1a1c5d60113727fad1208c91060f4d318dea412
tree2f940fd740a8beaa230335309d385bfb1d026776
parentb275baebd7e7fa8576cb49737a886f02e3615640
traffic learner: avoid truncated output files on error

add_argument(type=argparse.FileType('w'), ...) will open the file
and leave it empty if the script fails.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
script/traffic_learner