[Zope-Checkins] CVS: Zope/lib/python/DocumentTemplate/sequence - SortEx.py:1.5.6.1
Jeremy Hylton
jeremy@zope.com
Wed, 25 Sep 2002 11:56:06 -0400
Update of /cvs-repository/Zope/lib/python/DocumentTemplate/sequence
In directory cvs.zope.org:/tmp/cvs-serv24397
Modified Files:
Tag: Zope-2_6-branch
SortEx.py
Log Message:
Backport: Fix two-exception except clause. caught by pychecker.
=== Zope/lib/python/DocumentTemplate/sequence/SortEx.py 1.5 => 1.5.6.1 ===
--- Zope/lib/python/DocumentTemplate/sequence/SortEx.py:1.5 Wed Aug 14 18:29:53 2002
+++ Zope/lib/python/DocumentTemplate/sequence/SortEx.py Wed Sep 25 11:56:05 2002
@@ -98,7 +98,8 @@
try:
if mapping: akey = v[sk]
else: akey = getattr(v, sk)
- except AttributeError, KeyError: akey = None
+ except (AttributeError, KeyError):
+ akey = None
if not basic_type(akey):
try: akey = akey()
except: pass
@@ -107,7 +108,8 @@
try:
if mapping: k = v[sort]
else: k = getattr(v, sort)
- except AttributeError, KeyError: k = None
+ except (AttributeError, KeyError):
+ k = None
if not basic_type(type(k)):
try: k = k()
except: pass