Template language: fix returns inside for loops failing

This commit is contained in:
Charles Haley 2022-07-09 13:44:14 +01:00
parent c7ca4c9831
commit 07abc41994

View File

@ -903,7 +903,7 @@ class _Interpreter:
self.break_reporter("'for' list value", '', line_number)
ret = ''
return ret
except (StopException, ValueError) as e:
except (StopException, ValueError, ReturnExecuted) as e:
raise e
except Exception as e:
self.error(_("Unhandled exception '{0}'").format(e), line_number)