cwvreg.py
changeset 9367 c8a5f7f43c03
parent 9258 4e79f587c6ab
child 9469 032825bbacab
child 9701 46c8d8701240
child 9768 afcd46716d6a
equal deleted inserted replaced
9366:bcbc92223b35 9367:c8a5f7f43c03
   613                     cpath = cfg.build_appobjects_cube_path([cfg.cube_dir(cube)])
   613                     cpath = cfg.build_appobjects_cube_path([cfg.cube_dir(cube)])
   614                     cleanup_sys_modules(cpath)
   614                     cleanup_sys_modules(cpath)
   615         self.register_objects(path)
   615         self.register_objects(path)
   616         CW_EVENT_MANAGER.emit('after-registry-reload')
   616         CW_EVENT_MANAGER.emit('after-registry-reload')
   617 
   617 
       
   618     def load_file(self, filepath, modname):
       
   619         # override to allow some instrumentation (eg localperms)
       
   620         modpath = modname.split('.')
       
   621         try:
       
   622             self.currently_loading_cube = modpath[modpath.index('cubes') + 1]
       
   623         except ValueError:
       
   624             self.currently_loading_cube = 'cubicweb'
       
   625         return super(CWRegistryStore, self).load_file(filepath, modname)
       
   626 
   618     def _set_schema(self, schema):
   627     def _set_schema(self, schema):
   619         """set instance'schema"""
   628         """set instance'schema"""
   620         self.schema = schema
   629         self.schema = schema
   621         clear_cache(self, 'rqlhelper')
   630         clear_cache(self, 'rqlhelper')
   622 
   631