From f74d0f10daeba2f7ce86d17e3edd31816a3d8cb3 Mon Sep 17 00:00:00 2001 From: Daniel Morrison Date: Tue, 16 Apr 2019 19:17:43 -0400 Subject: [PATCH] Catch ValueError when trying to parse keys as int --- chevron/renderer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.47.3