Skip to content

Commit 95ed95e

Browse files
committed
add check for output attr
1 parent 08dec19 commit 95ed95e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/future/tests/base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ def _futurize_test_script(self, filename='mytestscript.py', stages=(1, 2),
342342
'----\n%s\n----' % f.read(),
343343
)
344344
ErrorClass = (FuturizeError if 'futurize' in script else PasteurizeError)
345+
if not hasattr(e, 'output'):
346+
# The attribute CalledProcessError.output doesn't exist on Py2.6
347+
e.output = None
345348
raise ErrorClass(msg, e.returncode, e.cmd, output=e.output)
346349
return output
347350

0 commit comments

Comments
 (0)