Commit c9681f6f authored by Jérome Perrin's avatar Jérome Perrin

Something was missing in r13550, sys.exc_info()[0] returned the exception

class, now we have the exception instance, so use isinstance instead of
issubclass



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13601 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9af88985
......@@ -313,7 +313,7 @@ class SQLDict(RAMDict):
# Unfortunately, database adapters may raise an exception against abort.
LOG('SQLDict', WARNING, 'abort failed, thus some objects may be modified accidentally')
pass
if issubclass(exc, ConflictError):
if isinstance(exc, ConflictError):
# For a conflict error, simply delay the operations.
for uid_list in uid_list_list:
if len(uid_list):
......
......@@ -134,7 +134,7 @@ class SQLQueue(RAMQueue):
LOG('SQLQueue', WARNING, 'abort failed, thus some objects may be modified accidentally')
pass
if issubclass(exc, ConflictError):
if isinstance(exc, ConflictError):
# If a conflict occurs, delay the operation.
activity_tool.SQLQueue_setPriority(uid = line.uid, date = next_processing_date,
priority = line.priority)
......
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