[Yum-devel] [PATCH #2] dbus-python is very picky

Bill Nottingham notting at redhat.com
Wed Mar 14 15:27:21 UTC 2007


Bill Nottingham (notting at redhat.com) said: 
> Fixes GetUpdateInfo() barfing with dbus-python-0.80 or later.

Here's an updated version - the out_signature is needed so that d-bus can
figure out what the list is theoretically supposed to be a list of when
it's empty.

Bill
-------------- next part --------------
Index: yum-updatesd.py
===================================================================
RCS file: /cvsroot/yum/cvs/yum/yum-updatesd.py,v
retrieving revision 1.37
diff -u -r1.37 yum-updatesd.py
--- yum-updatesd.py	14 Feb 2007 22:08:30 -0000	1.37
+++ yum-updatesd.py	14 Mar 2007 15:30:33 -0000
@@ -531,14 +531,14 @@
         self.updd.updatesCheck()
         return False
 
-    @dbus.service.method("edu.duke.linux.yum")
+    @dbus.service.method("edu.duke.linux.yum", in_signature="")
     def CheckNow(self):
         # make updating checking asynchronous since we discover whether
         # or not there are updates via a callback signal anyway
         gobject.idle_add(self.doCheck)
         return "check queued"
 
-    @dbus.service.method("edu.duke.linux.yum")
+    @dbus.service.method("edu.duke.linux.yum", in_signature="")
     def ShutDown(self):
         if not self.allowshutdown:
             return False
@@ -548,7 +548,7 @@
         gobject.idle_add(shutDown)
         return True
 
-    @dbus.service.method("edu.duke.linux.yum")
+    @dbus.service.method("edu.duke.linux.yum", in_signature="", out_signature="a(a{ss}a{ss})")
     def GetUpdateInfo(self):
         # FIXME: should this be async?
         upds = self.updd.getUpdateInfo()


More information about the Yum-devel mailing list