[yum-cvs] yum yum-updatesd.py,1.19,1.20

Jeremy Katz katzj at linux.duke.edu
Wed Sep 13 22:39:26 UTC 2006


Update of /home/groups/yum/cvs/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv12188

Modified Files:
	yum-updatesd.py 
Log Message:
* actually time out after a few tries
* catch another place we could potentially not unlock the pid file


Index: yum-updatesd.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum-updatesd.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- yum-updatesd.py	6 Sep 2006 02:19:00 -0000	1.19
+++ yum-updatesd.py	13 Sep 2006 22:39:24 -0000	1.20
@@ -478,17 +478,22 @@
             # if we can't get the lock, return what we have if we can
             if self.updateInfo: return self.updateInfo
             time.sleep(1)
+            tries += 1
         if tries == 10:
+            self.doUnlock(YUM_PID_FILE)
             return []
-        
-        self.doTsSetup()
-        self.doRpmDBSetup()
-        self.doUpdateSetup()
-
-        self.populateUpdates()
 
-        self.closeRpmDB()        
-        self.doUnlock(YUM_PID_FILE)
+        try:
+            self.doTsSetup()
+            self.doRpmDBSetup()
+            self.doUpdateSetup()
+
+            self.populateUpdates()
+
+            self.closeRpmDB()
+            self.doUnlock(YUM_PID_FILE)
+        except:
+            self.doUnlock(YUM_PID_FILE)
 
         return self.updateInfo
 




More information about the Yum-cvs-commits mailing list