mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-12 22:27:47 +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.kill()
|
||||||
p.wait()
|
p.wait()
|
||||||
raise
|
raise
|
||||||
except Exception:
|
except Exception as e:
|
||||||
p.kill()
|
p.kill()
|
||||||
p.wait()
|
p.wait()
|
||||||
raise exceptions.TutorError("Command failed: {}".format(" ".join(command)))
|
raise exceptions.TutorError(
|
||||||
|
"Command failed: {}".format(" ".join(command))
|
||||||
|
) from e
|
||||||
if result > 0:
|
if result > 0:
|
||||||
raise exceptions.TutorError(
|
raise exceptions.TutorError(
|
||||||
"Command failed with status {}: {}".format(result, " ".join(command))
|
"Command failed with status {}: {}".format(result, " ".join(command))
|
||||||
|
Loading…
Reference in New Issue
Block a user