Skip to content

Commit 69e7b87

Browse files
thefourtheyeFishrock123
authored andcommitted
tools: open test.tap file in write-binary mode
By default the logfile is opened in append mode. This commit makes sure that the file is opened in write-binary mode, so that the file will be created if it doesn't exist or overwrite if it exists. Fixes: #2834 PR-URL: #2837 Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Alexis Campailla <[email protected]>
1 parent eaa8e60 commit 69e7b87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1418,7 +1418,7 @@ def Main():
14181418
logger.addHandler(ch)
14191419
logger.setLevel(logging.INFO)
14201420
if options.logfile:
1421-
fh = logging.FileHandler(options.logfile)
1421+
fh = logging.FileHandler(options.logfile, mode='wb')
14221422
logger.addHandler(fh)
14231423

14241424
workspace = abspath(join(dirname(sys.argv[0]), '..'))

0 commit comments

Comments
 (0)