From: Daniel Morrison Date: Tue, 16 Apr 2019 23:17:43 +0000 (-0400) Subject: Catch ValueError when trying to parse keys as int X-Git-Url: https://git.devinivas.org/?a=commitdiff_plain;h=f74d0f10daeba2f7ce86d17e3edd31816a3d8cb3;p=chevron.git Catch ValueError when trying to parse keys as int --- diff --git a/chevron/renderer.py b/chevron/renderer.py index 0d0d4b9..43e97dc 100644 --- a/chevron/renderer.py +++ b/chevron/renderer.py @@ -86,7 +86,7 @@ def _get_key(key, scopes): return scope except AttributeError: return scope or '' - except (AttributeError, KeyError, IndexError): + except (AttributeError, KeyError, IndexError, ValueError): # We couldn't find the key in the current scope # We'll try again on the next pass pass