From f9043bf1565a5a2dda65839c4187a9b29ae6e14b 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 5ef8b7818cf..a3b95d14ac8 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