mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
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 <bugs@bergstroem.nu> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
This commit is contained in:
parent
ed087836af
commit
07fbf835ad
|
|
@ -1418,7 +1418,7 @@ def Main():
|
||||||
logger.addHandler(ch)
|
logger.addHandler(ch)
|
||||||
logger.setLevel(logging.INFO)
|
logger.setLevel(logging.INFO)
|
||||||
if options.logfile:
|
if options.logfile:
|
||||||
fh = logging.FileHandler(options.logfile)
|
fh = logging.FileHandler(options.logfile, mode='wb')
|
||||||
logger.addHandler(fh)
|
logger.addHandler(fh)
|
||||||
|
|
||||||
workspace = abspath(join(dirname(sys.argv[0]), '..'))
|
workspace = abspath(join(dirname(sys.argv[0]), '..'))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user