[Erp5-report] r15080 - /erp5/trunk/utils/oood/worker.py

nobody at svn.erp5.org nobody at svn.erp5.org
Sat Jun 30 00:05:54 CEST 2007


Author: kazuhiko
Date: Sat Jun 30 00:05:54 2007
New Revision: 15080

URL: http://svn.erp5.org?rev=15080&view=rev
Log:
try to close doc only if it exists to omit bogus log messages.

Modified:
    erp5/trunk/utils/oood/worker.py

Modified: erp5/trunk/utils/oood/worker.py
URL: http://svn.erp5.org/erp5/trunk/utils/oood/worker.py?rev=15080&r1=15079&r2=15080&view=diff
==============================================================================
--- erp5/trunk/utils/oood/worker.py (original)
+++ erp5/trunk/utils/oood/worker.py Sat Jun 30 00:05:54 2007
@@ -27,15 +27,14 @@
 #
 ##############################################################################
 
-import os, sys, pdb, time, string
+import os, sys, time, string
 import config
 sys.path.append(config.uno_path)
 import uno
-from unohelper import Base, systemPathToFileUrl, fileUrlToSystemPath,absolutize
+from unohelper import systemPathToFileUrl, fileUrlToSystemPath,absolutize
 from com.sun.star.beans import PropertyValue
 from com.sun.star.beans import PropertyExistException
 from com.sun.star.task import ErrorCodeIOException
-from com.sun.star.uno import Exception as UnoException
 from com.sun.star.lang import IllegalArgumentException
 
 import lib
@@ -229,7 +228,8 @@
     """
     Log.info('[worker] resetting worker %d' % self.idx)
     try:
-      self.doc.close(True)
+      if self.doc:
+        self.doc.close(True)
     except Exception, e:
       # we log exception but do not reraise
       Log.logException(e)




More information about the Erp5-report mailing list