summaryrefslogtreecommitdiffstats
path: root/src/Gui/CCDBusBackend.py
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2009-03-13 13:50:07 +0100
committerJiri Moskovcak <jmoskovc@redhat.com>2009-03-13 13:50:07 +0100
commitbc02aab93e78089ff48e381c0ced0a6dbb116efa (patch)
tree7660b0c7760232e8d76f0133ee993cf0b2320029 /src/Gui/CCDBusBackend.py
parentf1c7c25720243cb260410a57fef0c03f330dad68 (diff)
downloadabrt-bc02aab93e78089ff48e381c0ced0a6dbb116efa.tar.gz
abrt-bc02aab93e78089ff48e381c0ced0a6dbb116efa.tar.xz
abrt-bc02aab93e78089ff48e381c0ced0a6dbb116efa.zip
Added error reporting over dbus to daemon, error handling in gui, about dialog
Diffstat (limited to 'src/Gui/CCDBusBackend.py')
-rw-r--r--src/Gui/CCDBusBackend.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/Gui/CCDBusBackend.py b/src/Gui/CCDBusBackend.py
index 1966dfd..fe0e3f5 100644
--- a/src/Gui/CCDBusBackend.py
+++ b/src/Gui/CCDBusBackend.py
@@ -16,6 +16,8 @@ class DBusManager(gobject.GObject):
gobject.signal_new ("crash", self ,gobject.SIGNAL_RUN_FIRST,gobject.TYPE_NONE,())
# signal emited when new analyze is complete
gobject.signal_new ("analyze-complete", self ,gobject.SIGNAL_RUN_FIRST,gobject.TYPE_NONE,(gobject.TYPE_PYOBJECT,))
+ # signal emited when smth fails
+ gobject.signal_new ("error", self ,gobject.SIGNAL_RUN_FIRST,gobject.TYPE_NONE,(gobject.TYPE_PYOBJECT,))
# binds the dbus to glib mainloop
DBusGMainLoop(set_as_default=True)
self.proxy = None
@@ -27,6 +29,8 @@ class DBusManager(gobject.GObject):
self.proxy.connect_to_signal("Crash",self.crash_cb,dbus_interface=CC_IFACE)
# BT extracting complete
self.acconnection = self.proxy.connect_to_signal("AnalyzeComplete",self.analyze_complete_cb,dbus_interface=CC_IFACE)
+ # Catch Errors
+ self.acconnection = self.proxy.connect_to_signal("Error",self.error_handler_cb,dbus_interface=CC_IFACE)
else:
raise Exception("Proxy object doesn't exist!")
@@ -34,10 +38,12 @@ class DBusManager(gobject.GObject):
def disconnected(*args):
print "disconnect"
- def error_handler(self,*args):
- print "Error"
- #for arg in args:
- # print "error %s" % arg
+ def error_handler_cb(self,arg):
+ self.emit("error",arg)
+
+ def error_handler(self,arg):
+ # used to silently ingore dbus timeouts
+ pass
def dummy(*args):
# dummy function for async method call to workaround the timeout