[yum-git] yum/yumRepo.py

James Antill james at linux.duke.edu
Tue Jan 29 00:01:20 UTC 2008


 yum/yumRepo.py |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit e61876afee3b4738285f376e271558840f595a34
Author: James Antill <james at and.org>
Date:   Mon Jan 28 19:01:14 2008 -0500

    Make revert work for repos. without old repomd.xml files

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 098832a..1a7d918 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -794,7 +794,9 @@ class YumRepository(Repository, config.RepoConf):
         old_data = self._oldRepoMDData
         self._oldRepoMDData = {}
         
-        os.rename(old_data['old_local'], old_data['local'])
+        if 'old_local' in old_data:
+            os.rename(old_data['old_local'], old_data['local'])
+
         self._repoXML = old_data['old_repo_XML']
 
         if 'old_MD_files' not in old_data:



More information about the Yum-cvs-commits mailing list