diff options
Diffstat (limited to 'test/Deprecated/SourceSignatures/no-csigs.py')
-rw-r--r-- | test/Deprecated/SourceSignatures/no-csigs.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/Deprecated/SourceSignatures/no-csigs.py b/test/Deprecated/SourceSignatures/no-csigs.py index f815538..c4f2a78 100644 --- a/test/Deprecated/SourceSignatures/no-csigs.py +++ b/test/Deprecated/SourceSignatures/no-csigs.py @@ -36,7 +36,8 @@ test = TestSConsign.TestSConsign(match = TestSConsign.match_re) test.write('SConstruct', """\ SetOption('warn', 'deprecated-source-signatures') def build(env, target, source): - open(str(target[0]), 'wt').write(open(str(source[0]), 'rt').read()) + with open(str(target[0]), 'wt') as ofp, open(str(source[0]), 'rt') as ifp: + ofp.write(ifp.read()) B = Builder(action = build) env = Environment(BUILDERS = { 'B' : B }) env.B(target = 'f1.out', source = 'f1.in') |