Skip to content

Commit

Permalink
tools: open test.tap file in write-binary mode
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
thefourtheye authored and rvagg committed Sep 15, 2015
1 parent ed08783 commit 07fbf83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,7 @@ def Main():
logger.addHandler(ch)
logger.setLevel(logging.INFO)
if options.logfile:
fh = logging.FileHandler(options.logfile)
fh = logging.FileHandler(options.logfile, mode='wb')
logger.addHandler(fh)

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

0 comments on commit 07fbf83

Please sign in to comment.