schema.py
changeset 2598 a66fe74bd9fc
parent 2596 d02eed70937f
child 2616 4501ee760eec
equal deleted inserted replaced
2597:d9c5a7e0563c 2598:a66fe74bd9fc
   867         """return a Schema instance from the schema definition read
   867         """return a Schema instance from the schema definition read
   868         from <directory>
   868         from <directory>
   869         """
   869         """
   870         self.info('loading %s schemas', ', '.join(config.cubes()))
   870         self.info('loading %s schemas', ', '.join(config.cubes()))
   871         if config.apphome:
   871         if config.apphome:
   872             path = reversed([config.apphome] + config.cubes_path())
   872             path = tuple(reversed([config.apphome] + config.cubes_path()))
   873         else:
   873         else:
   874             path = reversed(config.cubes_path())
   874             path = tuple(reversed(config.cubes_path()))
   875         try:
   875         try:
   876             return super(CubicWebSchemaLoader, self).load(config, path=path, **kwargs)
   876             return super(CubicWebSchemaLoader, self).load(config, path=path, **kwargs)
   877         finally:
   877         finally:
   878             # we've to cleanup modules imported from cubicweb.schemas as well
   878             # we've to cleanup modules imported from cubicweb.schemas as well
   879             cleanup_sys_modules([self.lib_directory])
   879             cleanup_sys_modules([self.lib_directory])