Commit 3d0caf57 authored by Tres Seaver's avatar Tres Seaver

Fix bad except clause in the ``sequence_sort`` method of the ``<dtml-in>`` tag.

LP #267820
parent 5961fbc5
...@@ -152,6 +152,9 @@ Features Added ...@@ -152,6 +152,9 @@ Features Added
Bugs Fixed Bugs Fixed
++++++++++ ++++++++++
- LP #267820: Fix bad except clause in the ``sequence_sort`` method of
the ``<dtml-in>`` tag.
- LP #351006: Don't nest block tags inside HTML ``<p>`` tags in - LP #351006: Don't nest block tags inside HTML ``<p>`` tags in
``zExceptions.ExceptionFormatter``. ``zExceptions.ExceptionFormatter``.
......
...@@ -761,19 +761,15 @@ class InClass: ...@@ -761,19 +761,15 @@ class InClass:
if multsort: # More than one sort key. if multsort: # More than one sort key.
k = [] k = []
for sk in sortfields: for sk in sortfields:
try: if mapping: akey = v.get(sk)
if mapping: akey = v[sk] else: akey = getattr(v, sk, None)
else: akey = getattr(v, sk)
except AttributeError, KeyError: akey = None
if not basic_type(akey): if not basic_type(akey):
try: akey = akey() try: akey = akey()
except: pass except: pass
k.append(akey) k.append(akey)
else: # One sort key. else: # One sort key.
try: if mapping: k = v.get(sort)
if mapping: k = v[sort] else: k = getattr(v, sort, None)
else: k = getattr(v, sort)
except AttributeError, KeyError: k = None
if not basic_type(type(k)): if not basic_type(type(k)):
try: k = k() try: k = k()
except: pass except: pass
......
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