[Erp5-report] r33873 luke - /erp5/trunk/utils/erp5.timmy/src/erp5/timmy/timmy.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Mar 18 15:26:28 CET 2010


Author: luke
Date: Thu Mar 18 15:26:26 2010
New Revision: 33873

URL: http://svn.erp5.org?rev=33873&view=rev
Log:
 - defensive programming: stop started instance when installation requested
It is possible that instance for which there was installation request is
running (because of previous errors or human intervention)

Modified:
    erp5/trunk/utils/erp5.timmy/src/erp5/timmy/timmy.py

Modified: erp5/trunk/utils/erp5.timmy/src/erp5/timmy/timmy.py
URL: http://svn.erp5.org/erp5/trunk/utils/erp5.timmy/src/erp5/timmy/timmy.py?rev=33873&r1=33872&r2=33873&view=diff
==============================================================================
--- erp5/trunk/utils/erp5.timmy/src/erp5/timmy/timmy.py [utf8] (original)
+++ erp5/trunk/utils/erp5.timmy/src/erp5/timmy/timmy.py [utf8] Thu Mar 18 15:26:26 2010
@@ -258,6 +258,10 @@
 
   def install_ZopeInstance(self):
     # XXX: Very simple way to know if partition was installed
+    if self.getPartitionState_ZopeInstance() == 'started':
+      self.stop_ZopeInstance()
+      return 'reportError', 'Installation requested, instance was running - '\
+          'instance stopped, on next run will be installed'
     if os.path.exists(self.control_script):
       return 'reportInstalled', ''
     else:




More information about the Erp5-report mailing list