Commit cea35655 authored by Jérome Perrin's avatar Jérome Perrin

in addition to r24664, also try to create $INSTANCE_HOME/tests and

$INSTANCE_HOME/Document if they are not already present


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24666 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ce06e5d7
...@@ -627,6 +627,9 @@ def writeLocalTest(class_id, text, create=1, instance_home=None): ...@@ -627,6 +627,9 @@ def writeLocalTest(class_id, text, create=1, instance_home=None):
if instance_home is None: if instance_home is None:
instance_home = getConfiguration().instancehome instance_home = getConfiguration().instancehome
path = os.path.join(instance_home, "tests") path = os.path.join(instance_home, "tests")
if not os.path.exists(path):
os.mkdir(path)
LOG('ERP5Type', WARNING, 'Created missing but required directory: %s' %path)
path = os.path.join(path, "%s.py" % class_id) path = os.path.join(path, "%s.py" % class_id)
if create: if create:
if os.path.exists(path): if os.path.exists(path):
...@@ -696,6 +699,9 @@ def writeLocalDocument(class_id, text, create=1, instance_home=None): ...@@ -696,6 +699,9 @@ def writeLocalDocument(class_id, text, create=1, instance_home=None):
if instance_home is None: if instance_home is None:
instance_home = getConfiguration().instancehome instance_home = getConfiguration().instancehome
path = os.path.join(instance_home, "Document") path = os.path.join(instance_home, "Document")
if not os.path.exists(path):
os.mkdir(path)
LOG('ERP5Type', WARNING, 'Created missing but required directory: %s' %path)
path = os.path.join(path, "%s.py" % class_id) path = os.path.join(path, "%s.py" % class_id)
if create: if create:
if os.path.exists(path): if os.path.exists(path):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment