From efdf3fdbcd2f7654cb8d1209a8b040914437bacd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Tue, 23 Jul 2019 16:54:06 +0200 Subject: New upstream version 3.1.0 --- testing/framework/SConscript | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'testing/framework/SConscript') 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 -- cgit v1.2.3