[Zope-Checkins] CVS: Zope/lib/python/DocumentTemplate - pDocumentTemplate.py:1.37
Jeremy Hylton
jeremy@zope.com
Tue, 24 Sep 2002 18:07:31 -0400
Update of /cvs-repository/Zope/lib/python/DocumentTemplate
In directory cvs.zope.org:/tmp/cvs-serv18355
Modified Files:
pDocumentTemplate.py
Log Message:
Fix two-exception except clause.
Caught by pychecker.
=== Zope/lib/python/DocumentTemplate/pDocumentTemplate.py 1.36 => 1.37 ===
--- Zope/lib/python/DocumentTemplate/pDocumentTemplate.py:1.36 Wed Aug 14 18:29:53 2002
+++ Zope/lib/python/DocumentTemplate/pDocumentTemplate.py Tue Sep 24 18:07:31 2002
@@ -97,8 +97,11 @@
def __getitem__(self, key):
for d in self.dicts:
- try: return d[key]
- except KeyError, AttributeError: pass
+ try:
+ return d[key]
+ except (KeyError, AttributeError):
+ # XXX How do we get an AttributeError?
+ pass
raise KeyError, key
def push(self,d): self.dicts.insert(0,d)