[Yum-devel] [PATCH 2/3] Really fix the race for lock owner exiting, BZ 588002.

James Antill james at and.org
Mon Aug 16 21:44:43 UTC 2010


From: Mads Kiilerich <mads at kiilerich.com>

---
 utils.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/utils.py b/utils.py
index 9335112..868e5cc 100644
--- a/utils.py
+++ b/utils.py
@@ -101,12 +101,12 @@ def get_process_info(pid):
     return ps
 
 def show_lock_owner(pid, logger):
-    if not pid:
+    ps = get_process_info(pid)
+    if not ps:
         return
 
-    ps = get_process_info(pid)
     # This yumBackend isn't very friendly, so...
-    if ps is not None and ps['name'] == 'yumBackend.py':
+    if ps['name'] == 'yumBackend.py':
         nmsg = _("  The other application is: PackageKit")
     else:
         nmsg = _("  The other application is: %s") % ps['name']
-- 
1.7.2



More information about the Yum-devel mailing list