Skip to content

Commit

Permalink
One more fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
hannosch committed Sep 23, 2016
1 parent b234c03 commit c77fb37
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DocumentTemplate/_DocumentTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def __getitem__(self, key):

if key[0] == '_':
if key != '__str__':
raise KeyError(key) # Don't divuldge private data
raise KeyError(key) # Don't divulge private data
else:
return str(self.inst)

Expand Down Expand Up @@ -385,7 +385,7 @@ def getitem(self, key, call=0):
for e in reversed(self._data):
try:
e = e[key]
except KeyError:
except (KeyError, NameError):
continue

if call:
Expand All @@ -410,7 +410,7 @@ def __contains__(self, key):
for e in reversed(self._data):
try:
e = e[key]
except KeyError:
except (KeyError, NameError):
continue
return True
return False
Expand Down

0 comments on commit c77fb37

Please sign in to comment.