[Erp5-report] r44054 jm - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Mar 8 17:31:04 CET 2011


Author: jm
Date: Tue Mar  8 17:31:04 2011
New Revision: 44054

URL: http://svn.erp5.org?rev=44054&view=rev
Log:
Fix ImportError

Modified:
    erp5/trunk/products/ERP5/Document/BusinessTemplate.py

Modified: erp5/trunk/products/ERP5/Document/BusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BusinessTemplate.py?rev=44054&r1=44053&r2=44054&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Tue Mar  8 17:31:04 2011
@@ -4568,8 +4568,12 @@ Business Template is a set of definition
       self.clean()
 
       try:
-        self.setRevision(self.getVcsTool().newRevision())
-      except NotAWorkingCopyError:
+        from Products.ERP5VCS.WorkingCopy import NotAWorkingCopyError
+        try:
+          self.setRevision(self.getVcsTool().newRevision())
+        except NotAWorkingCopyError:
+          raise ImportError
+      except ImportError:
         self.updateRevisionNumber()
       self._setTemplateFormatVersion(1)
       self.storeTemplateItemData()



More information about the Erp5-report mailing list