summaryrefslogtreecommitdiff
path: root/testing/framework/SConscript
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-23 16:54:23 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-23 16:54:23 +0200
commitc2d9eaeffe9d77d8d5087fb21a3256fde32047d4 (patch)
tree144aeb4702d258b0cfaf99cffb9f21e94b026459 /testing/framework/SConscript
parent6ca68f29862bc7cbe5428426eee600cb1f3c05c1 (diff)
parentefdf3fdbcd2f7654cb8d1209a8b040914437bacd (diff)
Update upstream source from tag 'upstream/3.1.0'
Update to upstream version '3.1.0' with Debian dir e69b7671114411c368722827d87d86b44ed7cd40
Diffstat (limited to 'testing/framework/SConscript')
-rw-r--r--testing/framework/SConscript13
1 files changed, 7 insertions, 6 deletions
diff --git a/testing/framework/SConscript b/testing/framework/SConscript
index 535f187..f79a254 100644
--- a/testing/framework/SConscript
+++ b/testing/framework/SConscript
@@ -41,12 +41,13 @@ files = [
def copy(target, source, env):
t = str(target[0])
s = str(source[0])
- c = open(s, 'r').read()
- # Note: We construct the __ VERSION __ substitution string at
- # run-time so it doesn't get replaced when this file gets copied
- # into the tree for packaging.
- c = c.replace('__' + 'VERSION' + '__', env['VERSION'])
- open(t, 'w').write(c)
+ with open(s, 'r') as i, open(t, 'w') as o:
+ c = i.read()
+ # Note: We construct the __ VERSION __ substitution string at
+ # run-time so it doesn't get replaced when this file gets copied
+ # into the tree for packaging.
+ c = c.replace('__' + 'VERSION' + '__', env['VERSION'])
+ o.write(c)
for file in files:
# Guarantee that real copies of these files always exist in