Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

Commit f4b116d

Browse files
authored
Handle exceptions that don't have a returncode (#308)
Fixes #307
1 parent 58032a4 commit f4b116d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

codecov/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,11 @@ def try_to_run(cmd, shell=False, cwd=None):
226226
except Exception as e:
227227
write(
228228
" Error running `%s`: returncode=%s, output=%s"
229-
% (cmd, e.returncode, str(getattr(e, "output", str(e))))
229+
% (
230+
cmd,
231+
str(getattr(e, "returncode", None)),
232+
str(getattr(e, "output", str(e))),
233+
)
230234
)
231235
return None
232236

0 commit comments

Comments
 (0)