Commit 4ca1105a authored by Jeremy Hylton's avatar Jeremy Hylton

Fix two-exception except clause.

Caught by pychecker.
parent 72ae253a
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
__doc__='''Python implementations of document template some features __doc__='''Python implementations of document template some features
$Id: pDocumentTemplate.py,v 1.36 2002/08/14 22:29:53 mj Exp $''' $Id: pDocumentTemplate.py,v 1.37 2002/09/24 22:07:31 jeremy Exp $'''
__version__='$Revision: 1.36 $'[11:-2] __version__='$Revision: 1.37 $'[11:-2]
import sys, types import sys, types
...@@ -97,8 +97,11 @@ class MultiMapping: ...@@ -97,8 +97,11 @@ class MultiMapping:
def __getitem__(self, key): def __getitem__(self, key):
for d in self.dicts: for d in self.dicts:
try: return d[key] try:
except KeyError, AttributeError: pass return d[key]
except (KeyError, AttributeError):
# XXX How do we get an AttributeError?
pass
raise KeyError, key raise KeyError, key
def push(self,d): self.dicts.insert(0,d) def push(self,d): self.dicts.insert(0,d)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment