[yum-commits] Branch 'yum-3_2_X' - yum/yumRepo.py

James Antill james at osuosl.org
Thu Nov 6 15:54:19 UTC 2008


 yum/yumRepo.py |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 0a79698b6ce13e918b90e569de618a0b8aa43ef6
Author: James Antill <james at and.org>
Date:   Thu Nov 6 10:54:13 2008 -0500

    Only eat the exception if it's ENOENT

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index decc662..9a24d20 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -44,6 +44,7 @@ import warnings
 import glob
 import shutil
 import stat
+import errno
 
 #  If you want yum to _always_ check the MD .sqlite files then set this to
 # False (this doesn't affect .xml files or .sqilte files derived from them).
@@ -209,8 +210,9 @@ class YumPackageSack(packageSack.PackageSack):
                 if not repo.cache:
                     try:
                         os.unlink(db_un_fn)
-                    except: # Could have an error before anything happens
-                        pass
+                    except OSError, e:
+                        if e.errno != errno.ENOENT:
+                            raise # Could have an error before anything happens
             else:
                 result = db_un_fn
 


More information about the Yum-commits mailing list