diff options
| author | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-08-03 12:31:57 +0200 |
|---|---|---|
| committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-08-03 12:31:57 +0200 |
| commit | ee2e495f2eafaa8a2f65ad769bef6761e7f02856 (patch) | |
| tree | 26eee94d6e85006930dec6f2a975d7115da53383 /src/Gui/CCDBusBackend.py | |
| parent | e89460e8ad1202471695edaeb6364ff15ad4f585 (diff) | |
| download | abrt-ee2e495f2eafaa8a2f65ad769bef6761e7f02856.tar.gz abrt-ee2e495f2eafaa8a2f65ad769bef6761e7f02856.tar.xz abrt-ee2e495f2eafaa8a2f65ad769bef6761e7f02856.zip | |
DBus: Many fixes to client -> cli works again, changed JobDone notification
Diffstat (limited to 'src/Gui/CCDBusBackend.py')
| -rw-r--r-- | src/Gui/CCDBusBackend.py | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/Gui/CCDBusBackend.py b/src/Gui/CCDBusBackend.py index cac0ec5..546e107 100644 --- a/src/Gui/CCDBusBackend.py +++ b/src/Gui/CCDBusBackend.py @@ -20,7 +20,6 @@ class DBusManager(gobject.GObject): # and later with policyKit bus = None uniq_name = None - pending_jobs = [] def __init__(self): session = None # binds the dbus to glib mainloop @@ -128,7 +127,7 @@ class DBusManager(gobject.GObject): if not self.bus: self.bus = dbus.SystemBus() self.bus.add_signal_receiver(self.owner_changed_cb,"NameOwnerChanged", dbus_interface="org.freedesktop.DBus") - #self.uniq_name = bus.get_unique_name() + self.uniq_name = self.bus.get_unique_name() if not self.bus: raise Exception("Can't connect to dbus") if self.bus.name_has_owner(CC_NAME): @@ -153,17 +152,16 @@ class DBusManager(gobject.GObject): raise Exception("Please check if abrt daemon is running.") def addJob(self, job_id): - self.pending_jobs.append(job_id) + pass + #self.pending_jobs.append(job_id) - def jobdone_cb(self, job_id): - #if self.uniq_name == client_id: - try: - self.pending_jobs.index(job_id) - except: - return - dump = self.cc.GetJobResult(job_id) - if dump: - self.emit("analyze-complete", dump) + def jobdone_cb(self, dest, job_id): + if self.uniq_name == dest: + dump = self.cc.GetJobResult(job_id) + if dump: + self.emit("analyze-complete", dump) + else: + raise Exception("Daemon did't return valid report info") def getReport(self, UUID): try: |
