summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSakthipriyan Vairamani <thechargingvolcano@gmail.com>2015-09-13 01:24:57 +0530
committerJeremiah Senkpiel <fishrock123@rocketmail.com>2015-09-15 13:53:21 -0400
commit69e7b875a2c4c52bf39bb41fb405e917d836804e (patch)
tree7f5e25f2fd5eeb3f869a121bfaa1b22dae0d3e91 /tools
parenteaa8e60b91eaedd65befa62a4493c110c5f4a148 (diff)
downloadnodejs-69e7b875a2c4c52bf39bb41fb405e917d836804e.tar.gz
nodejs-69e7b875a2c4c52bf39bb41fb405e917d836804e.tar.bz2
nodejs-69e7b875a2c4c52bf39bb41fb405e917d836804e.zip
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>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/test.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/test.py b/tools/test.py
index 452b99edb..59a31bf1c 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -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]), '..'))