From 40f3b7137d5cbcb34c048f29fca1671855f6bf88 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Tue, 22 Sep 2015 14:18:37 -0400 Subject: [PATCH] Fix dict wrapper access to not raise an exception --- util/dict_wrappers.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/util/dict_wrappers.py b/util/dict_wrappers.py index d017a9573..901c82857 100644 --- a/util/dict_wrappers.py +++ b/util/dict_wrappers.py @@ -57,10 +57,7 @@ class JSONPathDict(object): self._object = dict_value def __getitem__(self, path): - def raise_exception(): - raise KeyError('Unknown path: %s' % path) - - return self.get(path, not_found_handler=raise_exception) + return self.get(path) def get(self, path, not_found_handler=None): """ Returns the value found at the given path. Path is a json-path expression. """