summaryrefslogtreecommitdiffstats
path: root/test/redirection.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/redirection.py')
-rw-r--r--test/redirection.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/test/redirection.py b/test/redirection.py
index 0960dfd..0512e44 100644
--- a/test/redirection.py
+++ b/test/redirection.py
@@ -32,7 +32,6 @@ test = TestSCons.TestSCons()
test.write('cat.py', r"""
import sys
-PY3K = sys.version_info >= (3, 0)
# write binary to stdout
if sys.platform == "win32":
@@ -45,17 +44,10 @@ try:
with open(sys.argv[1], 'rb') as f:
indata = f.read()
except IndexError:
- if PY3K:
- source = sys.stdin.buffer
- else:
- source = sys.stdin
+ source = sys.stdin
indata = source.read()
-if PY3K:
- sys.stdout.buffer.write(indata)
-else:
- sys.stdout.write(indata)
-
+sys.stdout.buffer.write(indata)
sys.exit(0)
""")