mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-12 14:17:46 +00:00
Better error management in execute internal function
This commit is contained in:
parent
8d4bb1fc9e
commit
d978401155
@ -172,10 +172,12 @@ def execute(*command):
|
||||
p.kill()
|
||||
p.wait()
|
||||
raise
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
p.kill()
|
||||
p.wait()
|
||||
raise exceptions.TutorError("Command failed: {}".format(" ".join(command)))
|
||||
raise exceptions.TutorError(
|
||||
"Command failed: {}".format(" ".join(command))
|
||||
) from e
|
||||
if result > 0:
|
||||
raise exceptions.TutorError(
|
||||
"Command failed with status {}: {}".format(result, " ".join(command))
|
||||
|
Loading…
Reference in New Issue
Block a user