1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2025-11-12 17:09:16 +01:00

Small bugfix & enhancement

This commit is contained in:
Yann 2017-03-31 11:22:44 +02:00
commit 3e3b4740da
2 changed files with 4 additions and 2 deletions

View file

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

View file

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