From a27be2651cf847470df86922b54ed33c00e55ca7 Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Tue, 27 Mar 2012 12:06:21 -0400 Subject: [PATCH] make yum module work with older yum for rhel5 :( --- library/yum | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/library/yum b/library/yum index 5ef8b7818c..a3b95d14ac 100755 --- a/library/yum +++ b/library/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