Commit 66e7f5da authored by Yoshinori Okuji's avatar Yoshinori Okuji

Specify uid_only in getUidForPath.

Show a traceback for an exception.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2434 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5348b142
......@@ -917,7 +917,7 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base):
#LOG("No Index, Call SQL Method %s with args:" % method_name,0, str(kw))
method(**kw)
except:
LOG("SQLCatalog Warning: could not catalog object with method %s" % method_name,100, str(path))
LOG("SQLCatalog Warning: could not catalog object with method %s" % method_name,100, str(path), error=sys.exc_info())
raise
#except:
# # # This is a real LOG message
......@@ -1063,7 +1063,7 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base):
return None
# Get the appropriate SQL Method
method = getattr(self, self.sql_getitem_by_path)
search_result = method(path = path)
search_result = method(path = path, uid_only=1)
# If not emptyn return first record
if len(search_result) > 0:
return search_result[0].uid
......
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