diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-03-10 23:18:20 -0500 |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-03-10 23:18:20 -0500 |
commit | 11366ad5debbf75a67f35aebea1dec65ae3e7397 (patch) | |
tree | 0e6bac0c3a132ba90e6b60b1419cc9bac42c8c09 /test/CacheDir | |
parent | 48ec207f5ac6ac95674e945cac0ed45ef6296808 (diff) | |
download | scons-11366ad5debbf75a67f35aebea1dec65ae3e7397.tar.gz |
remove rb/wb from file opens, not needed py2/3
Diffstat (limited to 'test/CacheDir')
-rw-r--r-- | test/CacheDir/option--cd.py | 6 | ||||
-rw-r--r-- | test/CacheDir/option--cf.py | 6 | ||||
-rw-r--r-- | test/CacheDir/option--cr.py | 6 | ||||
-rw-r--r-- | test/CacheDir/option--cs.py | 12 |
4 files changed, 15 insertions, 15 deletions
diff --git a/test/CacheDir/option--cd.py b/test/CacheDir/option--cd.py index b77cfeb2..efcf8434 100644 --- a/test/CacheDir/option--cd.py +++ b/test/CacheDir/option--cd.py @@ -41,10 +41,10 @@ test.subdir('cache', 'src') test.write(['src', 'SConstruct'], """ def cat(env, source, target): target = str(target[0]) - open('cat.out', 'ab').write(target + "\\n") - f = open(target, "wb") + open('cat.out', 'a').write(target + "\\n") + f = open(target, "w") for src in source: - f.write(open(str(src), "rb").read()) + f.write(open(str(src), "r").read()) f.close() env = Environment(BUILDERS={'Cat':Builder(action=cat)}) env.Cat('aaa.out', 'aaa.in') diff --git a/test/CacheDir/option--cf.py b/test/CacheDir/option--cf.py index 6d64059d..ace0df6b 100644 --- a/test/CacheDir/option--cf.py +++ b/test/CacheDir/option--cf.py @@ -40,10 +40,10 @@ test.subdir('cache', 'src') test.write(['src', 'SConstruct'], """ def cat(env, source, target): target = str(target[0]) - open('cat.out', 'ab').write(target + "\\n") - f = open(target, "wb") + open('cat.out', 'a').write(target + "\\n") + f = open(target, "w") for src in source: - f.write(open(str(src), "rb").read()) + f.write(open(str(src), "r").read()) f.close() env = Environment(BUILDERS={'Cat':Builder(action=cat)}) env.Cat('aaa.out', 'aaa.in') diff --git a/test/CacheDir/option--cr.py b/test/CacheDir/option--cr.py index de6bbc85..165e0496 100644 --- a/test/CacheDir/option--cr.py +++ b/test/CacheDir/option--cr.py @@ -41,10 +41,10 @@ test.subdir('cache', 'src') test.write(['src', 'SConstruct'], """ def cat(env, source, target): target = str(target[0]) - open('cat.out', 'ab').write(target + "\\n") - f = open(target, "wb") + open('cat.out', 'a').write(target + "\\n") + f = open(target, "w") for src in source: - f.write(open(str(src), "rb").read()) + f.write(open(str(src), "r").read()) f.close() env = Environment(BUILDERS={'Cat':Builder(action=cat)}) env.Cat('aaa.out', 'aaa.in') diff --git a/test/CacheDir/option--cs.py b/test/CacheDir/option--cs.py index 6d228141..bff585d6 100644 --- a/test/CacheDir/option--cs.py +++ b/test/CacheDir/option--cs.py @@ -45,10 +45,10 @@ test.subdir('cache', 'src1', 'src2') test.write(['src1', 'build.py'], r""" import sys -open('cat.out', 'ab').write(sys.argv[1] + "\n") -file = open(sys.argv[1], 'wb') +open('cat.out', 'a').write(sys.argv[1] + "\n") +file = open(sys.argv[1], 'w') for src in sys.argv[2:]: - file.write(open(src, 'rb').read()) + file.write(open(src, 'r').read()) file.close() """) @@ -57,10 +57,10 @@ cache = test.workpath('cache') test.write(['src1', 'SConstruct'], """ def cat(env, source, target): target = str(target[0]) - open('cat.out', 'ab').write(target + "\\n") - f = open(target, "wb") + open('cat.out', 'a').write(target + "\\n") + f = open(target, "w") for src in source: - f.write(open(str(src), "rb").read()) + f.write(open(str(src), "r").read()) f.close() env = Environment(BUILDERS={'Internal':Builder(action=cat), 'External':Builder(action=r'%(_python_)s build.py $TARGET $SOURCES')}) |