Kaydet (Commit) d1c819db authored tarafından Bahadır Kandemir's avatar Bahadır Kandemir

Never query PK

üst 9636032f
......@@ -129,18 +129,7 @@ class Call:
raise AttributeError, "Package name required for non-async calls."
def queryPolicyKit(self, action):
bus = dbus.SessionBus()
try:
obj = bus.get_object("org.freedesktop.PolicyKit1.AuthenticationAgent", "/")
except dbus.DBusException, exception:
print exception
return False
iface = dbus.Interface(obj, "org.freedesktop.PolicyKit1.AuthenticationAgent")
try:
return iface.ObtainAuthorization(action, 0, os.getpid(), timeout=2**16-1) == 1
except dbus.DBusException, exception:
print exception
return False
return False
class Link:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment