diff options
Diffstat (limited to 'test/Parallel/failed-build.py')
-rw-r--r-- | test/Parallel/failed-build.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/Parallel/failed-build.py b/test/Parallel/failed-build.py index 2360679..bfdc01d 100644 --- a/test/Parallel/failed-build.py +++ b/test/Parallel/failed-build.py @@ -78,7 +78,8 @@ import os import sys import time os.mkdir('mycopy.started') -open(sys.argv[1], 'wb').write(open(sys.argv[2], 'rb').read()) +with open(sys.argv[1], 'wb') as ofp, open(sys.argv[2], 'rb') as ifp: + ofp.write(ifp.read()) for i in [1, 2, 3, 4, 5]: time.sleep(2) if os.path.exists('myfail.exiting'): |