diff options
-rw-r--r-- | py/mock/plugins/yum_cache.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/py/mock/plugins/yum_cache.py b/py/mock/plugins/yum_cache.py index e2a7aa3..0ced767 100644 --- a/py/mock/plugins/yum_cache.py +++ b/py/mock/plugins/yum_cache.py @@ -89,13 +89,13 @@ class YumCache(object): os.unlink(fullPath) continue - # yum made an rpmdb cache dir in $cachedir/installed for a while; - # things can go wrong in a specific mock case if this happened. - # So - just nuke the dir and all that's in it. - if os.path.exists(self.yumSharedCachePath + '/installed'): - for fn in glob.glob(self.yumSharedCachePath + '/installed/*'): - os.unlink(fn) - os.rmdir(self.yumSharedCachePath + '/installed') + # yum made an rpmdb cache dir in $cachedir/installed for a while; + # things can go wrong in a specific mock case if this happened. + # So - just nuke the dir and all that's in it. + if os.path.exists(self.yumSharedCachePath + '/installed'): + for fn in glob.glob(self.yumSharedCachePath + '/installed/*'): + os.unlink(fn) + os.rmdir(self.yumSharedCachePath + '/installed') self._yumCachePostYumHook() |