[packagekit] bug in FAQ web page

مؤيد السعدي muayyad.alsadi at ojuba.org
Fri Aug 7 08:42:55 PDT 2009


hello,

the C code in http://packagekit.org/pk-faq.html#session-methods
works fine but the second c and python snippet does not

here is the correct python snippet



import dbus

try:
    bus = dbus.SessionBus()
except dbus.DBusException, e:
    print 'Unable to connect to dbus: %s' % str(e)
    sys.exit()
try:
    proxy = bus.get_object('org.freedesktop.PackageKit',
'/org/freedesktop/PackageKit')
    iface = dbus.Interface(proxy, 'org.freedesktop.PackageKit.Modify')
    iface.InstallPackageNames(0, ["openoffice-clipart",
"openoffice-clipart-extras"], "show-confirm-search,hide-finished")
except dbus.DBusException, e:
    print 'Unable to use PackageKit: %s' % str(e)




More information about the PackageKit mailing list