summaryrefslogtreecommitdiffstats
path: root/src/Gui
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2009-08-03 12:31:57 +0200
committerJiri Moskovcak <jmoskovc@redhat.com>2009-08-03 12:31:57 +0200
commitee2e495f2eafaa8a2f65ad769bef6761e7f02856 (patch)
tree26eee94d6e85006930dec6f2a975d7115da53383 /src/Gui
parente89460e8ad1202471695edaeb6364ff15ad4f585 (diff)
downloadabrt-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')
-rw-r--r--src/Gui/CCDBusBackend.py22
-rw-r--r--src/Gui/CCMainWindow.py2
2 files changed, 11 insertions, 13 deletions
diff --git a/src/Gui/CCDBusBackend.py b/src/Gui/CCDBusBackend.py
index cac0ec52..546e1070 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:
diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py
index 9d9ff4d9..c2f75ab2 100644
--- a/src/Gui/CCMainWindow.py
+++ b/src/Gui/CCMainWindow.py
@@ -145,7 +145,7 @@ class MainWindow():
try:
dumplist = getDumpList(self.ccdaemon, refresh=True)
except Exception, e:
- gui_error_message("Error while loading the dumplist, please check if abrt daemon is running\n %s" % e.message)
+ gui_error_message("Error while loading the dumplist, please check if abrt daemon is running\n %s" % e)
for entry in dumplist:
try:
icon = get_icon_for_package(self.theme, entry.getPackageName())