diff --git a/codecov/__init__.py b/codecov/__init__.py index 352822b4..5f8694eb 100644 --- a/codecov/__init__.py +++ b/codecov/__init__.py @@ -177,7 +177,7 @@ def try_to_run(cmd, shell=True): try: return check_output(cmd, shell=shell) except subprocess.CalledProcessError as e: - write(' Error running `%s`: %s' % (cmd, str(getattr(e, 'output', str(e))))) + write(' Error running `%s`: %s' % (cmd, e.output or str(e))) def run_python_coverage(args): """Run the Python coverage tool