# HG changeset patch # User Sylvain Thénault # Date 1264151249 -3600 # Node ID e817a54cdbc19ad08a73a2173b96875fcf7a1192 # Parent aae19998dd930d90fca06e0ee6d7b1e6f17f388c we need extrapath when trying to import site_cubicweb files diff -r aae19998dd93 -r e817a54cdbc1 cwconfig.py --- a/cwconfig.py Fri Jan 22 10:07:03 2010 +0100 +++ b/cwconfig.py Fri Jan 22 10:07:29 2010 +0100 @@ -883,8 +883,12 @@ self.warning('site_erudi.py is deprecated, should be renamed to site_cubicweb.py') def _load_site_cubicweb(self, sitefile): - from logilab.common.modutils import load_module_from_file - module = load_module_from_file(sitefile) + # XXX extrapath argument to load_module_from_file only in lgc > 0.46 + from logilab.common.modutils import load_module_from_modpath, modpath_from_file + def load_module_from_file(filepath, path=None, use_sys=1, extrapath=None): + return load_module_from_modpath(modpath_from_file(filepath, extrapath), + path, use_sys) + module = load_module_from_file(sitefile, extrapath=self.extrapath) self.info('%s loaded', sitefile) # cube specific options if getattr(module, 'options', None):