Commit f9043bf1 by Seth Vidal

make yum module work with older yum for rhel5 :(

parent 3f9f8de0
...@@ -41,7 +41,12 @@ def yum_base(conf_file=None, cachedir=False): ...@@ -41,7 +41,12 @@ def yum_base(conf_file=None, cachedir=False):
if conf_file and os.path.exists(conf_file): if conf_file and os.path.exists(conf_file):
my.preconf.fn = conf_file my.preconf.fn = conf_file
if cachedir: 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 return my
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment