make yum module work with older yum for rhel5 :(

reviewable/pr18780/r1
Seth Vidal 13 years ago
parent bd7710e1b5
commit bd3fdb89d4

7
yum

@ -41,7 +41,12 @@ def yum_base(conf_file=None, cachedir=False):
if conf_file and os.path.exists(conf_file):
my.preconf.fn = conf_file
if cachedir:
my.setCacheDir()
if hasattr(my, 'setCacheDir'):
my.setCacheDir()
else:
cachedir = yum.misc.getCacheDir()
my.repos.setCacheDir(cachedir)
my.conf.cache = 0
return my

Loading…
Cancel
Save