summaryrefslogtreecommitdiffstats
path: root/test/AS/as-live.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/AS/as-live.py')
-rw-r--r--test/AS/as-live.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/AS/as-live.py b/test/AS/as-live.py
index 879e7b2..b781caf 100644
--- a/test/AS/as-live.py
+++ b/test/AS/as-live.py
@@ -58,7 +58,8 @@ if sys.platform == "win32":
test.write("wrapper.py", """\
import os
import sys
-open('%s', 'wb').write(("wrapper.py: %%s\\n" %% sys.argv[-1]).encode())
+with open('%s', 'wb') as f:
+ f.write(("wrapper.py: %%s\\n" %% sys.argv[-1]).encode())
cmd = " ".join(sys.argv[1:])
os.system(cmd)
""" % test.workpath('wrapper.out').replace('\\', '\\\\'))