cubicweb/cwconfig.py
branch3.25
changeset 12109 425be06bb1e8
parent 12078 82d2c1cdf0c2
child 12115 8d0127498a28
equal deleted inserted replaced
12108:1a5fc93c81db 12109:425be06bb1e8
   757                     __import__(pkgname)
   757                     __import__(pkgname)
   758                 except Exception:
   758                 except Exception:
   759                     cls.exception('while loading cube %s', cube)
   759                     cls.exception('while loading cube %s', cube)
   760             else:
   760             else:
   761                 cls.warning('no __init__ file in cube %s', cube)
   761                 cls.warning('no __init__ file in cube %s', cube)
   762 
       
   763     @classmethod
       
   764     def init_available_cubes(cls):
       
   765         """cubes may register some sources (svnfile for instance) in their
       
   766         __init__ file, so they should be loaded early in the startup process
       
   767         """
       
   768         for cube in cls.available_cubes():
       
   769             try:
       
   770                 __import__('cubes.%s' % cube)
       
   771             except Exception as ex:
       
   772                 cls.warning("can't init cube %s: %s", cube, ex)
       
   773 
   762 
   774     cubicweb_appobject_path = set(['entities'])
   763     cubicweb_appobject_path = set(['entities'])
   775     cube_appobject_path = set(['entities'])
   764     cube_appobject_path = set(['entities'])
   776 
   765 
   777     def __init__(self, debugmode=False):
   766     def __init__(self, debugmode=False):