configmgr.create['outdir'] = self.options.outdir
if self.options.cachedir is not None:
configmgr.create['cachedir'] = self.options.cachedir
+ os.environ['ZYPP_LOCKFILE_ROOT'] = configmgr.create['cachedir']
if self.options.local_pkgs_path is not None:
configmgr.create['local_pkgs_path'] = self.options.local_pkgs_path
import os, sys
import msger
import pluginbase
+from mic.utils import errors
__ALL__ = ['PluginMgr', 'pluginmgr']
return cls._instance
def __init__(self):
-
- # default plugin directory
- for pt in PLUGIN_TYPES:
- self._add_plugindir(os.path.join(DEFAULT_PLUGIN_LOCATION, pt))
+ pass
def append_dirs(self, dirs):
for path in dirs:
def get_plugins(self, ptype):
""" the return value is dict of name:class pairs """
-
- # good place to load all the plugins
- self._load_all()
+ if ptype in PLUGIN_TYPES:
+ self._add_plugindir(os.path.join(DEFAULT_PLUGIN_LOCATION, ptype))
+ self._load_all()
+ else:
+ raise errors.CreatorError('%s is not valid plugin type' % ptype)
return pluginbase.get_plugins(ptype)