Commit d843bd10 authored by Ivan Tyagov's avatar Ivan Tyagov

Minor syntax fixes. Verbose messages.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14416 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f498e3bd
...@@ -188,7 +188,8 @@ class OOoDocument(File, ConversionCacheMixin): ...@@ -188,7 +188,8 @@ class OOoDocument(File, ConversionCacheMixin):
else: else:
# This is very temporary code - XXX needs to be changed # This is very temporary code - XXX needs to be changed
# so that the system can retry # so that the system can retry
raise ConversionError(response_code), response_message raise ConversionError("[DMS] Can not get list of allowed acceptable formats for conversion: %s (%s)"
%(response_code, response_message))
except Fault, f: except Fault, f:
allowed = server_proxy.getAllowedTargets(content_type) allowed = server_proxy.getAllowedTargets(content_type)
warn('Your oood version is too old, using old method ' warn('Your oood version is too old, using old method '
...@@ -290,7 +291,7 @@ class OOoDocument(File, ConversionCacheMixin): ...@@ -290,7 +291,7 @@ class OOoDocument(File, ConversionCacheMixin):
return 'text/plain', self.asTextContent() return 'text/plain', self.asTextContent()
# Raise an error if the format is not supported # Raise an error if the format is not supported
if not self.isTargetFormatAllowed(format): if not self.isTargetFormatAllowed(format):
raise ConversionError, 'Target format %s is not supported' % format raise ConversionError("[DMS] Target format %s is not supported" % format)
# Check if we have already a base conversion # Check if we have already a base conversion
if not self.hasBaseData(): if not self.hasBaseData():
self.convertToBaseFormat() self.convertToBaseFormat()
...@@ -390,7 +391,8 @@ class OOoDocument(File, ConversionCacheMixin): ...@@ -390,7 +391,8 @@ class OOoDocument(File, ConversionCacheMixin):
else: else:
# log and raise errors with converting server.Explicitly raise the exception! # log and raise errors with converting server.Explicitly raise the exception!
LOG('[DMS]', ERROR, 'Error converting document to base format %s:%s' %(response_code, response_message)) LOG('[DMS]', ERROR, 'Error converting document to base format %s:%s' %(response_code, response_message))
raise ConversionError(response_code), response_message raise ConversionError("[DMS] Error converting document to base format %s:%s:"
%(response_code, response_message))
security.declareProtected(Permissions.AccessContentsInformation, 'getContentInformation') security.declareProtected(Permissions.AccessContentsInformation, 'getContentInformation')
def getContentInformation(self): def getContentInformation(self):
...@@ -416,5 +418,5 @@ class OOoDocument(File, ConversionCacheMixin): ...@@ -416,5 +418,5 @@ class OOoDocument(File, ConversionCacheMixin):
self._setBaseData(dec(response_dict['data'])) self._setBaseData(dec(response_dict['data']))
else: else:
# log and raise errors with converting server.Explicitly raise the exception! # log and raise errors with converting server.Explicitly raise the exception!
LOG('[DMS]', ERROR, 'Error getting document\'s metadata %s:%s' %(response_code, response_message)) LOG('[DMS]', ERROR, "Error getting document's metadata %s:%s" %(response_code, response_message))
raise ConversionError(response_code), response_message raise ConversionError("[DMS] Error getting document's metadata %s:%s" %(response_code, response_message))
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