Browse Source

Small bugfix & enhancement

Yann Weber 7 years ago
parent
commit
3e3b4740da
2 changed files with 4 additions and 2 deletions
  1. 2
    1
      lodel/context.py
  2. 2
    1
      lodel/plugins/multisite/loader_utils.py

+ 2
- 1
lodel/context.py View File

@@ -91,7 +91,8 @@ class LodelMetaPathFinder(importlib.abc.MetaPathFinder):
91 91
                 fd.close()
92 92
             lodel_pkg_path = os.path.join(mod_path, 'lodel')
93 93
             if not os.path.exists(lodel_pkg_path):
94
-                os.symlink(lodel.__path__[0], lodel_pkg_path, True)
94
+                os.symlink(src = lodel.__path__[0], dst = lodel_pkg_path,
95
+		    target_is_directory = True)
95 96
             #Cache invalidation after we "created" the new package
96 97
             #importlib.invalidate_caches()
97 98
         return None

+ 2
- 1
lodel/plugins/multisite/loader_utils.py View File

@@ -86,7 +86,8 @@ def main():
86 86
             datapath = os.path.join(lodelsites_datapath, handled_sitename)
87 87
             try:
88 88
                 site_load(datapath) #using default conf.d configuration dirname
89
-            except LodelFatalError as e:
89
+            except Exception as e:
90
+                LodelContext.set(None)
90 91
                 LodelContext.set(lodelsites_name)
91 92
                 LodelContext.expose_modules(globals(), {
92 93
                     'lodel.settings': ['Settings'],

Loading…
Cancel
Save