summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Dawson <phil.dawson@codethink.co.uk>2018-06-22 09:51:21 +0100
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2018-08-14 05:33:23 +0000
commit9e2b66cc13dd889926745d053ba55c2e17e9f8df (patch)
treec50ebd35b092d9f7740dcd1f69649caaca33a5f2
parentb82d67938d984f52dd9f24cd0f6fc0874df3639c (diff)
downloadbuildstream-9e2b66cc13dd889926745d053ba55c2e17e9f8df.tar.gz
app.py: Handle exception thrown when recursion limit is exceeded
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 44687a95a..cdc60a90d 100644
--- a/buildstream/_frontend/app.py
+++ b/buildstream/_frontend/app.py
@@ -275,6 +275,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