-
-
Notifications
You must be signed in to change notification settings - Fork 552
Display exit code with InvocationErrors #290
Copy link
Copy link
Closed
Labels
area:commands-executionarea:reportingfeature:newsomething does not exist yet, but shouldsomething does not exist yet, but shouldlevel:mediumrought estimate that this might be neither easy nor hard to implementrought estimate that this might be neither easy nor hard to implement
Metadata
Metadata
Assignees
Labels
area:commands-executionarea:reportingfeature:newsomething does not exist yet, but shouldsomething does not exist yet, but shouldlevel:mediumrought estimate that this might be neither easy nor hard to implementrought estimate that this might be neither easy nor hard to implement
When a command fails, you currently only get
ERROR: InvocationError: '/usr/bin/false', but the exitcode itself is useful/important, e.g. withpy.test using 5 for "no tests collected".
The following patch would provide that, by using a custom
__str__method forInvocationError - but it does not handle the case where that might be missing (not all instances / calls to it provide it).
Maybe a custom
__init__should be used to set the arguments as properties explicitly, and then use them?!This is related / similar to #192.