[Erp5-report] r45757 vincent - /erp5/trunk/products/ERP5Type/Globals.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Apr 29 16:11:02 CEST 2011


Author: vincent
Date: Fri Apr 29 16:11:02 2011
New Revision: 45757

URL: http://svn.erp5.org?rev=45757&view=rev
Log:
softwarehome is not present on _cfg on SlapOS setups.

This problem was triggered by allowing ZEO to import non-packaged products,
and trying to resolve a conflict on
Products.ERP5Type.Utils.ScalarMaxConflictResolver, which imports Globals.

Modified:
    erp5/trunk/products/ERP5Type/Globals.py

Modified: erp5/trunk/products/ERP5Type/Globals.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Globals.py?rev=45757&r1=45756&r2=45757&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Globals.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Globals.py [utf8] Fri Apr 29 16:11:02 2011
@@ -67,7 +67,11 @@ _cfg = _getConfiguration()
 DevelopmentMode = _cfg.debug_mode
 # backward compatibility
 INSTANCE_HOME = _cfg.instancehome
-SOFTWARE_HOME = _cfg.softwarehome
+try:
+  SOFTWARE_HOME = _cfg.softwarehome
+except AttributeError:
+  # Not present when imported from ZEO (for conflict resolution).
+  pass
 
 # don't tempt potential users by leaving these lying around
 del _cfg, _getConfiguration



More information about the Erp5-report mailing list