Commit 74c66278 authored by Jérome Perrin's avatar Jérome Perrin

bug fix: do not override builtin KeyError

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6823 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4d9048c7
...@@ -705,7 +705,7 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -705,7 +705,7 @@ class SelectionTool( UniqueObject, SimpleItem ):
selection = self.getSelectionFor(selection_name, REQUEST) selection = self.getSelectionFor(selection_name, REQUEST)
if selection is None: if selection is None:
selection = Selection() selection = Selection()
self.setSelectionFor(selection_name,selection, REQUEST=REQUEST) self.setSelectionFor(selection_name, selection, REQUEST=REQUEST)
if listbox_display_mode == 'FlatListMode': if listbox_display_mode == 'FlatListMode':
flat_list_mode = 1 flat_list_mode = 1
...@@ -934,7 +934,7 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -934,7 +934,7 @@ class SelectionTool( UniqueObject, SimpleItem ):
if object_uid is not None: if object_uid is not None:
try : try :
o = self.portal_catalog.getObject(object_uid) o = self.portal_catalog.getObject(object_uid)
except NotFound, KeyError : except (NotFound, KeyError), err :
o = None o = None
if o is None: if o is None:
# we first try to reindex the object, thanks to the object_path # we first try to reindex the object, thanks to the object_path
...@@ -959,12 +959,8 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -959,12 +959,8 @@ class SelectionTool( UniqueObject, SimpleItem ):
for field in form.get_fields(include_disabled=0): for field in form.get_fields(include_disabled=0):
if field.get_value('editable', REQUEST=REQUEST): if field.get_value('editable', REQUEST=REQUEST):
try: try:
dumb = field.get_value('is_relation_field') field.get_value('is_relation_field')
except: except KeyError:
# except KeyError:
# XXX FIXME Exception name is not in locals.
# Namespace seems a bit broken...
LOG("SelectionTool", 0, "Exception catched with broken namespace!")
pass pass
else: else:
if index == relation_index: if index == relation_index:
......
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