diff --git a/gluon/restricted.py b/gluon/restricted.py index 84c46b36..95410f5c 100644 --- a/gluon/restricted.py +++ b/gluon/restricted.py @@ -137,7 +137,7 @@ class RestrictedError(Exception): self.environment = environment if layer: try: - self.traceback = traceback.format_exc() + self.traceback = traceback.format_exc(limit=1) except: self.traceback = 'no traceback because template parsing error' try: