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

James Antill james at osuosl.org
Thu Jan 20 14:23:14 UTC 2011


 yum/__init__.py |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 363b3ad8089e4d45da272ee29b31a52b68ddf6ff
Author: James Antill <james at and.org>
Date:   Wed Jan 19 09:33:34 2011 -0500

    Don't traceback if we haven't setup the ts save file (anaconda). BZ 670784.

diff --git a/yum/__init__.py b/yum/__init__.py
index fca6ab4..2d9385e 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -1437,10 +1437,11 @@ class YumBase(depsolve.Depsolve):
         self.rpmdb.transactionResultVersion(frpmdbv)
 
         # transaction has started - all bets are off on our saved ts file
-        try:
-            os.unlink(self._ts_save_file)
-        except (IOError, OSError), e:
-            pass
+        if self._ts_save_file is not None:
+            try:
+                os.unlink(self._ts_save_file)
+            except (IOError, OSError), e:
+                pass
         self._ts_save_file = None
         
         errors = self.ts.run(cb.callback, '')


More information about the Yum-commits mailing list