summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Dawson <phil.dawson@codethink.co.uk>2018-06-22 09:51:21 +0100
committerJim MacArthur <jim.macarthur@codethink.co.uk>2018-07-25 14:03:23 +0100
commit95b4eae4954ba0f3d65c85f58a37fdcd46b4b8af (patch)
tree730cf53c1a6970e5b0583bf73ad0e2a77d085917
parenta0ad985f7b342d68a19803ae23319eac3b895550 (diff)
downloadbuildstream-phil/203-BuildStream-crashes-when-dependency-tree-too-deep.tar.gz
app.py: Handle exception thrown when recursion limit is exceededphil/203-BuildStream-crashes-when-dependency-tree-too-deep
Because the RecursionError exception was introduced in Python 3.5, until we drop support for for Python 3.4, we must use RuntimeError.
-rw-r--r--buildstream/_frontend/app.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/buildstream/_frontend/app.py b/buildstream/_frontend/app.py
index c8f1f435d..5fae0307b 100644
--- a/buildstream/_frontend/app.py
+++ b/buildstream/_frontend/app.py
@@ -270,6 +270,10 @@ class App():
# Exit with the error
self._error_exit(e)
+ except RecursionError:
+ click.echo("RecursionError: Depency depth is too large. Maximum recursion depth exceeded.",
+ err=True)
+ sys.exit(-1)
else:
# No exceptions occurred, print session time and summary