mirror of https://github.com/explosion/spaCy.git
Prevent duplicate traceback on CalledProcessError [ci skip]
This commit is contained in:
parent
61a4ef0b46
commit
416deb412f
|
@ -679,6 +679,10 @@ def run_command(
|
||||||
raise FileNotFoundError(
|
raise FileNotFoundError(
|
||||||
Errors.E970.format(str_command=" ".join(command), tool=command[0])
|
Errors.E970.format(str_command=" ".join(command), tool=command[0])
|
||||||
) from None
|
) from None
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
# We don't want a duplicate traceback here
|
||||||
|
print(e)
|
||||||
|
sys.exit(1)
|
||||||
if ret.returncode != 0:
|
if ret.returncode != 0:
|
||||||
sys.exit(ret.returncode)
|
sys.exit(ret.returncode)
|
||||||
return ret
|
return ret
|
||||||
|
|
Loading…
Reference in New Issue