diff options
author | Thomi Richards <thomi.richards@canonical.com> | 2013-12-02 18:52:10 +1300 |
---|---|---|
committer | Thomi Richards <thomi.richards@canonical.com> | 2013-12-02 18:52:10 +1300 |
commit | d89e45d46a28021669adf7f65ab6c985ca859189 (patch) | |
tree | 591f11564c8ae42a9f538dab46b90c24e9adee24 /python/subunit/_output.py | |
parent | 988c887744f0047938586efe8db84c39de1c3315 (diff) | |
download | subunit-git-d89e45d46a28021669adf7f65ab6c985ca859189.tar.gz |
Fix failing tests.
Diffstat (limited to 'python/subunit/_output.py')
-rw-r--r-- | python/subunit/_output.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/subunit/_output.py b/python/subunit/_output.py index 0e9302b..af9dcad 100644 --- a/python/subunit/_output.py +++ b/python/subunit/_output.py @@ -132,7 +132,7 @@ def parse_arguments(args=None, ParserClass=OptionParser): if not options.file_name: options.file_name = 'stdin' if sys.version[0] >= '3': - options.attach_file = sys.stdin.buffer + options.attach_file = getattr(sys.stdin, 'buffer', sys.stdin) else: options.attach_file = sys.stdin else: @@ -150,10 +150,10 @@ def parse_arguments(args=None, ParserClass=OptionParser): def set_status_cb(option, opt_str, value, parser, status_name): if getattr(parser.values, "action", None) is not None: - raise OptionValueError("argument %s: Only one status may be specified at once." % option) + raise OptionValueError("argument %s: Only one status may be specified at once." % opt_str) if len(parser.rargs) == 0: - raise OptionValueError("argument %s: must specify a single TEST_ID." % option) + raise OptionValueError("argument %s: must specify a single TEST_ID." % opt_str) parser.values.action = status_name parser.values.test_id = parser.rargs.pop(0) |