summaryrefslogtreecommitdiff
path: root/python/subunit
diff options
context:
space:
mode:
Diffstat (limited to 'python/subunit')
-rw-r--r--python/subunit/_output.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/subunit/_output.py b/python/subunit/_output.py
index 8be2ca8..0a1ef5d 100644
--- a/python/subunit/_output.py
+++ b/python/subunit/_output.py
@@ -131,7 +131,10 @@ def parse_arguments(args=None, ParserClass=OptionParser):
if options.attach_file == '-':
if not options.file_name:
options.file_name = 'stdin'
- options.attach_file = sys.stdin
+ if sys.version[0] >= '3':
+ options.attach_file = sys.stdin.buffer
+ else:
+ options.attach_file = sys.stdin
else:
try:
options.attach_file = open(options.attach_file, 'rb')