We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 023affc commit 8e8025bCopy full SHA for 8e8025b
src/mirakuru/base.py
@@ -367,11 +367,12 @@ def process_stopped() -> bool:
367
# Did the process shut down cleanly? A an exit code of `-sig` means
368
# that it has terminated due to signal `sig`, which is intended. So
369
# don't treat that as an error.
370
- expected_exit_code = -sig
+ # While sig seems to be returned on Windows
371
+ expected_exit_codes = (sig, -sig)
372
if exp_sig is not None:
- expected_exit_code = -exp_sig
373
+ expected_exit_codes = (exp_sig, -exp_sig)
374
- if exit_code and exit_code != expected_exit_code:
375
+ if exit_code and exit_code not in expected_exit_codes:
376
raise ProcessFinishedWithError(self, exit_code)
377
378
return self
0 commit comments