[yum-git] plugins/refresh-updatesd

Tim Lauridsen timlau at linux.duke.edu
Fri May 30 08:01:42 UTC 2008


 plugins/refresh-updatesd/refresh-updatesd.py |   13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

New commits:
commit c40b92a5ab5c96030967af9747123183c7b7baf1
Author: Tim Lauridsen <tla at rasmil.dk>
Date:   Fri May 30 09:50:24 2008 +0200

    Make the plugin a little simpler so it dont fails (rhbz #437254)

diff --git a/plugins/refresh-updatesd/refresh-updatesd.py b/plugins/refresh-updatesd/refresh-updatesd.py
index 7357431..8ae5599 100644
--- a/plugins/refresh-updatesd/refresh-updatesd.py
+++ b/plugins/refresh-updatesd/refresh-updatesd.py
@@ -27,7 +27,6 @@ def posttrans_hook(conduit):
     """
     if os.geteuid(): # If we aren't root, we _can't_ have updated anything
        return
-
     try:
         bus = dbus.SystemBus()
     except dbus.DBusException, e:
@@ -35,18 +34,10 @@ def posttrans_hook(conduit):
         conduit.info(6, "%s" %(e,))
         return
     try:
-        o = bus.get_object('org.freedesktop.DBus', '/')
-        if not o.NameHasOwner("edu.duke.linux.yum"):
-            conduit.info(2, "yum-updatesd not on the bus")
-            return
-    except dbus.DBusException, e:
-        conduit.info(2, "Unable to look at what's on dbus")
-        conduit.info(6, "%s" %(e,))
-        return
-    try:
         updatesd_proxy = bus.get_object('edu.duke.linux.yum', '/Updatesd')
         updatesd_iface = dbus.Interface(updatesd_proxy, 'edu.duke.linux.yum')
         updatesd_iface.CheckNow()
-    except dbus.DBusException, e:
+    except Exception, e:
         conduit.info(2, "Unable to send message to yum-updatesd")
         conduit.info(6, "%s" %(e,))
+



More information about the Yum-cvs-commits mailing list