]> Devi Nivas Git - chevron.git/commitdiff
Catch ValueError when trying to parse keys as int
authorDaniel Morrison <dan@morrison.ph>
Tue, 16 Apr 2019 23:17:43 +0000 (19:17 -0400)
committerDaniel Morrison <dan@morrison.ph>
Tue, 16 Apr 2019 23:17:43 +0000 (19:17 -0400)
chevron/renderer.py

index 0d0d4b971310cf0c5efdfd0d449794fa3fb68449..43e97dc1f36fa5d426fdbbd9ab0b1d53c651c8b1 100644 (file)
@@ -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