From 416deb412f3cbf4fcf6658a2006e9d63c28d4e05 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Sun, 13 Sep 2020 19:28:54 +0200 Subject: [PATCH] Prevent duplicate traceback on CalledProcessError [ci skip] --- spacy/util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spacy/util.py b/spacy/util.py index 6f1efe926..d1df1f92a 100644 --- a/spacy/util.py +++ b/spacy/util.py @@ -679,6 +679,10 @@ def run_command( raise FileNotFoundError( Errors.E970.format(str_command=" ".join(command), tool=command[0]) ) from None + except subprocess.CalledProcessError as e: + # We don't want a duplicate traceback here + print(e) + sys.exit(1) if ret.returncode != 0: sys.exit(ret.returncode) return ret