[Erp5-report] r36275 kazuhiko - /erp5/trunk/utils/erp5.recipe.zope2instance/src/erp5/recipe...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Jun 11 15:40:31 CEST 2010
Author: kazuhiko
Date: Fri Jun 11 15:40:17 2010
New Revision: 36275
URL: http://svn.erp5.org?rev=36275&view=rev
Log:
this part is no longer required.
Modified:
erp5/trunk/utils/erp5.recipe.zope2instance/src/erp5/recipe/zope2instance/__init__.py
Modified: erp5/trunk/utils/erp5.recipe.zope2instance/src/erp5/recipe/zope2instance/__init__.py
URL: http://svn.erp5.org/erp5/trunk/utils/erp5.recipe.zope2instance/src/erp5/recipe/zope2instance/__init__.py?rev=36275&r1=36274&r2=36275&view=diff
==============================================================================
--- erp5/trunk/utils/erp5.recipe.zope2instance/src/erp5/recipe/zope2instance/__init__.py [utf8] (original)
+++ erp5/trunk/utils/erp5.recipe.zope2instance/src/erp5/recipe/zope2instance/__init__.py [utf8] Fri Jun 11 15:40:17 2010
@@ -18,7 +18,7 @@ import plone.recipe.zope2instance
class Recipe(plone.recipe.zope2instance.Recipe):
def install(self):
- # Override plone.recipe.zope2instance so as to create several
+ # Override plone.recipe.zope2instance so as to prepare several
# directories used by ERP5.
options = self.options
location = options['location']
@@ -27,9 +27,7 @@ class Recipe(plone.recipe.zope2instance.
ws_locations = [d.location for d in ws]
if os.path.exists(location):
- # patch begin: call self._clean_up instead of shutil.rmtree
- self._clean_up(location)
- # patch end: call self._clean_up instead of shutil.rmtree
+ shutil.rmtree(location)
# What follows is a bit of a hack because the instance-setup mechanism
# is a bit monolithic. We'll run mkzopeinstance and then we'll
@@ -104,23 +102,7 @@ class Recipe(plone.recipe.zope2instance.
except:
# clean up
if os.path.exists(location):
- # patch begin: call self._clean_up instead of shutil.rmtree
- self._clean_up(location)
- # patch end: call self._clean_up instead of shutil.rmtree
+ shutil.rmtree(location)
raise
return location
-
- def _clean_up(self, location):
- # do not delete contents in several directories that can be
- # modified by business template installation.
- for path in os.listdir(location):
- if path in ('Constraint', 'Document', 'Extensions',
- 'PropertySheet', 'tests',):
- pass
- else:
- path = os.path.join(location, path)
- if os.path.isdir(path) and not os.path.islink(path):
- shutil.rmtree(path)
- else:
- os.unlink(path)
More information about the Erp5-report
mailing list