Commit 805a82e3 authored by Ivan Tyagov's avatar Ivan Tyagov

Try to convert only if not already converted.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29850 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f56fc0b9
......@@ -59,25 +59,28 @@ from xmlrpclib import Fault\n
from socket import error as SocketError\n
\n
message = None\n
try:\n
return context.convertToBaseFormat()\n
except ConflictError:\n
raise\n
except ConversionError, e:\n
message = \'Conversion Error: %s\' % (str(e) or \'undefined.\')\n
except Fault, e:\n
message = \'XMLFault: %s\' % (repr(e) or \'undefined.\')\n
except SocketError, e:\n
message = \'Socket Error: %s\' % (repr(e) or \'undefined.\')\n
except Exception, e:\n
message = \'Problem: %s\' % (repr(e) or \'undefined.\')\n
except:\n
message = \'Problem: unknown\'\n
# reach here, then exception was raised.\n
# message must be logged in workflow.\n
context.processFile(comment=message)\n
# try again.\n
context.activate(priority=3).convertToBaseFormat()\n
if context.getExternalProcessingState()!=\'converted\':\n
# try to convert to base format only if not already done\n
try:\n
return context.convertToBaseFormat()\n
except ConflictError:\n
raise\n
except ConversionError, e:\n
message = \'Conversion Error: %s\' % (str(e) or \'undefined.\')\n
except Fault, e:\n
message = \'XMLFault: %s\' % (repr(e) or \'undefined.\')\n
except SocketError, e:\n
message = \'Socket Error: %s\' % (repr(e) or \'undefined.\')\n
except Exception, e:\n
message = \'Problem: %s\' % (repr(e) or \'undefined.\')\n
except:\n
message = \'Problem: unknown\'\n
\n
# reach here, then exception was raised.\n
# message must be logged in workflow.\n
context.processFile(comment=message)\n
# try again.\n
context.activate(priority=3).convertToBaseFormat()\n
return message\n
</string> </value>
</item>
......
1043
\ No newline at end of file
1044
\ No newline at end of file
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