Browse Source

Dirty workaround in plugins

Yann Weber 8 years ago
parent
commit
93b713edf0
2 changed files with 4 additions and 1 deletions
  1. 1
    1
      lodel/context.py
  2. 3
    0
      lodel/plugin/plugins.py

+ 1
- 1
lodel/context.py View File

@@ -524,7 +524,7 @@ MONOSITE mode")
524 524
     #@return The module name in the current context
525 525
     def _translate(self, module_fullname):
526 526
         if module_fullname.startswith('lodel'):
527
-            return module_fullname.replace('lodel', self.__pkg_name)
527
+            return self.__pkg_name + module_fullname[5:]
528 528
         if module_fullname.startswith('leapi_dyncode'):
529 529
             return self.__pkg_name+'.'+module_fullname
530 530
         raise ContextModuleError("Given module is not lodel nor dyncode \

+ 3
- 0
lodel/plugin/plugins.py View File

@@ -431,6 +431,9 @@ name differ from the one found in plugin's init file"
431 431
    
432 432
     ##@brief Return associated module name
433 433
     def module_name(self):
434
+        #WOOT WE LOVE DIRTY WORKAROUNDS !!!
435
+        return "lodel.plugins."+os.path.basename(self.path)
436
+        #END OF DIRTY WORKAROUND
434 437
         if not self.path.startswith('./plugins'):
435 438
             raise PluginError("Bad path for plugin %s : %s" % (
436 439
                 self.name, self.path))

Loading…
Cancel
Save