cubicweb/cwconfig.py
changeset 11966 fe995d56c949
parent 11944 5284fee68601
child 11974 d92d75b17a85
--- a/cubicweb/cwconfig.py	Tue Feb 21 10:12:47 2017 +0100
+++ b/cubicweb/cwconfig.py	Wed Feb 08 17:54:16 2017 +0100
@@ -503,6 +503,7 @@
     @classmethod
     def available_cubes(cls):
         cubes = set()
+        prefix = 'cubicweb_'
         for entry_point in pkg_resources.iter_entry_points(
                 group='cubicweb.cubes', name=None):
             try:
@@ -511,11 +512,11 @@
                 continue
             else:
                 modname = module.__name__
-                if not modname.startswith('cubicweb_'):
+                if not modname.startswith(prefix):
                     cls.warning('entry point %s does not appear to be a cube',
                                 entry_point)
                     continue
-                cubes.add(modname)
+                cubes.add(modname[len(prefix):])
         # Legacy cubes.
         for directory in cls.cubes_search_path():
             if not exists(directory):