[Erp5-report] r40466 jerome - /erp5/trunk/products/ERP5OOo/Document/OOoDocument.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Nov 22 14:51:29 CET 2010


Author: jerome
Date: Mon Nov 22 14:51:28 2010
New Revision: 40466

URL: http://svn.erp5.org?rev=40466&view=rev
Log:
if there is a message in the ProtocolError, display it

Modified:
    erp5/trunk/products/ERP5OOo/Document/OOoDocument.py

Modified: erp5/trunk/products/ERP5OOo/Document/OOoDocument.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/Document/OOoDocument.py?rev=40466&r1=40465&r2=40466&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/Document/OOoDocument.py [utf8] (original)
+++ erp5/trunk/products/ERP5OOo/Document/OOoDocument.py [utf8] Mon Nov 22 14:51:28 2010
@@ -77,8 +77,11 @@ class _ProtocolErrorCatcher(object):
     try:
       return self.__callable(*args, **kw)
     except ProtocolError, e:
-      raise ConversionError("Network error while contacting OOo conversion"
-                            " server: server might be unreachable")
+      message = "%s %s" % (e.errcode, e.errmsg)
+      if e.errcode == -1:
+        message = "Connection refused"
+      raise ConversionError("Protocol error while contacting OOo conversion"
+                            " server: %s" % (message))
 
 class OOoServerProxy(ServerProxy):
   """




More information about the Erp5-report mailing list