summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Monniez <moc@odoo.com>2017-09-20 13:43:40 +0200
committerChristophe Monniez <moc@odoo.com>2017-10-03 12:01:52 +0200
commit0bab2e7fbd1b39860f480dbb673814d380e2ad34 (patch)
tree3cd0c8c38e3ac7f8d2be874f48bff1c4245c4c59
parent1e76ffc7bd19cf7072e2c38d5d49b78cf94bb172 (diff)
[FIX] modules: Verify that an addons path exists
-rw-r--r--odoo/modules/module.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/odoo/modules/module.py b/odoo/modules/module.py
index b249f01c1d9..586a43af69e 100644
--- a/odoo/modules/module.py
+++ b/odoo/modules/module.py
@@ -139,13 +139,13 @@ def initialize_sys_path():
# add base module path
base_path = os.path.abspath(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'addons'))
- if base_path not in ad_paths:
+ if base_path not in ad_paths and os.path.isdir(base_path):
ad_paths.append(base_path)
# add odoo.addons.__path__
for ad in __import__('odoo.addons').addons.__path__:
ad = os.path.abspath(ad)
- if ad not in ad_paths:
+ if ad not in ad_paths and os.path.isdir(ad):
ad_paths.append(ad)
if not hooked: