Commit 8cb90285 authored by Nicolas Dumazet's avatar Nicolas Dumazet

create Extensions directory in instance home when it doesnt exist


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40821 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d614bf22
...@@ -734,6 +734,9 @@ def writeLocalExtension(class_id, text, create=1, instance_home=None): ...@@ -734,6 +734,9 @@ def writeLocalExtension(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, "Extensions") path = os.path.join(instance_home, "Extensions")
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