def yum_base(self):
    my = yum.YumBase()
    my.preconf.debuglevel = 0
    my.preconf.errorlevel = 0
    my.preconf.plugins = True
    my.preconf.enabled_plugins = self.enable_plugin
    my.preconf.disabled_plugins = self.disable_plugin
    if self.releasever:
        my.preconf.releasever = self.releasever
    if (self.installroot != '/'):
        my.preconf.root = self.installroot
        my.conf.installroot = self.installroot
    if (self.conf_file and os.path.exists(self.conf_file)):
        my.preconf.fn = self.conf_file
    if (os.geteuid() != 0):
        if hasattr(my, 'setCacheDir'):
            my.setCacheDir()
        else:
            cachedir = yum.misc.getCacheDir()
            my.repos.setCacheDir(cachedir)
            my.conf.cache = 0
    if self.disable_excludes:
        my.conf.disable_excludes = self.disable_excludes
    return my
def yum_base(self):
    my = yum.YumBase()
    my.preconf.debuglevel = 0
    my.preconf.errorlevel = 0
    my.preconf.plugins = True
    my.preconf.enabled_plugins = self.enable_plugin
    my.preconf.disabled_plugins = self.disable_plugin
    if self.releasever:
        my.preconf.releasever = self.releasever
    if (self.installroot != '/'):
        my.preconf.root = self.installroot
        my.conf.installroot = self.installroot
    if (self.conf_file and os.path.exists(self.conf_file)):
        my.preconf.fn = self.conf_file
    if (os.geteuid() != 0):
        if hasattr(my, 'setCacheDir'):
            my.setCacheDir()
        else:
            cachedir = yum.misc.getCacheDir()
            my.repos.setCacheDir(cachedir)
            my.conf.cache = 0
    if self.disable_excludes:
        my.conf.disable_excludes = self.disable_excludes
    return my