diff options
Diffstat (limited to 'test/Deprecated/SourceSignatures/implicit-cache.py')
-rw-r--r-- | test/Deprecated/SourceSignatures/implicit-cache.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/Deprecated/SourceSignatures/implicit-cache.py b/test/Deprecated/SourceSignatures/implicit-cache.py index af6aa49..a4bdc78 100644 --- a/test/Deprecated/SourceSignatures/implicit-cache.py +++ b/test/Deprecated/SourceSignatures/implicit-cache.py @@ -41,7 +41,8 @@ SetOption('implicit_cache', 1) SourceSignatures('timestamp') 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 = 'both.out', source = 'both.in') |