summaryrefslogtreecommitdiff
path: root/test/srcchange.py
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-03-10 22:59:38 -0500
committerWilliam Deegan <bill@baddogconsulting.com>2017-03-10 22:59:38 -0500
commit81214922c425f975b02223e5d5b0c3cc5c97ac3e (patch)
treef1cae8944e4174413baaaa22ea644960a19aef6a /test/srcchange.py
parentd8fc11cab43bdcd01f88573bb3579e506a506ad3 (diff)
downloadscons-81214922c425f975b02223e5d5b0c3cc5c97ac3e.tar.gz
remove rb/wb from file opens, not needed py2/3
Diffstat (limited to 'test/srcchange.py')
-rw-r--r--test/srcchange.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/srcchange.py b/test/srcchange.py
index f2fde91a..bbad4e7a 100644
--- a/test/srcchange.py
+++ b/test/srcchange.py
@@ -44,7 +44,8 @@ test = TestSCons.TestSCons()
test.write('getrevision', """
#!/usr/bin/env python
-print open('revnum.in','rb').read().strip()
+from __future__ import print_function
+print(open('revnum.in','r').read().strip())
""")
test.write('SConstruct', """
@@ -55,7 +56,7 @@ def subrevision(target, source ,env):
new = re.sub('\$REV.*?\$',
'$REV: %%s$'%%source[0].get_text_contents().strip(),
target[0].get_text_contents())
- outf = open(str(target[0]),'wb')
+ outf = open(str(target[0]),'w')
outf.write(new)
outf.close()