Commit 28b76553 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 2c0c8869
......@@ -36,6 +36,9 @@ Features Added
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
``zExceptions.ExceptionFormatter``.
......
......@@ -761,19 +761,15 @@ class InClass:
if multsort: # More than one sort key.
k = []
for sk in sortfields:
try:
if mapping: akey = v[sk]
else: akey = getattr(v, sk)
except AttributeError, KeyError: akey = None
if mapping: akey = v.get(sk)
else: akey = getattr(v, sk, None)
if not basic_type(akey):
try: akey = akey()
except: pass
k.append(akey)
else: # One sort key.
try:
if mapping: k = v[sort]
else: k = getattr(v, sort)
except AttributeError, KeyError: k = None
if mapping: k = v.get(sort)
else: k = getattr(v, sort, None)
if not basic_type(type(k)):
try: k = k()
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