summaryrefslogtreecommitdiffstats
path: root/test/Deprecated/SourceCode/SourceCode.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/Deprecated/SourceCode/SourceCode.py')
-rw-r--r--test/Deprecated/SourceCode/SourceCode.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/Deprecated/SourceCode/SourceCode.py b/test/Deprecated/SourceCode/SourceCode.py
index b5c0ba9..b7f1305 100644
--- a/test/Deprecated/SourceCode/SourceCode.py
+++ b/test/Deprecated/SourceCode/SourceCode.py
@@ -49,10 +49,10 @@ import os
def cat(env, source, target):
target = str(target[0])
- f = open(target, "wb")
- for src in source:
- f.write(open(str(src), "rb").read())
- f.close()
+ with open(target, "wb") as ofp:
+ for src in source:
+ with open(str(src), "rb") as ifp:
+ ofp.write(ifp.read())
def sc_cat(env, source, target):
source = []