From c792d3f70a27d4513dd557ab396541938b9c2dd2 Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Mon, 9 Mar 2009 16:54:57 +0100 Subject: Increased timeout for async dbus calls to 60sec --- src/Gui/CCDBusBackend.py | 6 +++--- src/Gui/CCMainWindow.py | 18 +++++++++--------- src/Gui/ccgui.glade | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Gui/CCDBusBackend.py b/src/Gui/CCDBusBackend.py index c5fc498b..e18667c6 100644 --- a/src/Gui/CCDBusBackend.py +++ b/src/Gui/CCDBusBackend.py @@ -26,7 +26,7 @@ class DBusManager(gobject.GObject): # new crash notify self.proxy.connect_to_signal("Crash",self.crash_cb,dbus_interface=CC_IFACE) # BT extracting complete - #self.proxy.connect_to_signal("AnalyzeComplete",self.analyze_complete_cb,dbus_interface=CC_IFACE) + #self.acconnection = self.proxy.connect_to_signal("AnalyzeComplete",self.analyze_complete_cb,dbus_interface=CC_IFACE) else: raise Exception("Proxy object doesn't exist!") @@ -63,9 +63,9 @@ class DBusManager(gobject.GObject): def getReport(self, UUID): try: - #return self.cc.CreateReport(UUID) # let's try it async - self.cc.CreateReport(UUID, reply_handler=self.analyze_complete_cb, error_handler=self.error_handler) + # even if it's async it timeouts, so let's try to set the timeout to 60sec + self.cc.CreateReport(UUID, reply_handler=self.analyze_complete_cb, error_handler=self.error_handler, timeout=60) except dbus.exceptions.DBusException, e: raise Exception(e.message) diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py index 35e9b1a3..ed9c05cb 100644 --- a/src/Gui/CCMainWindow.py +++ b/src/Gui/CCMainWindow.py @@ -5,7 +5,6 @@ import gobject import gtk import gtk.glade import CCDBusBackend -import sys from CC_gui_functions import * from CCDumpList import getDumpList, DumpList from CCReporterDialog import ReporterDialog @@ -13,7 +12,7 @@ from CCReport import Report from exception import installExceptionHandler, handleMyException try: import rpm -except: +except Exception, ex: rpm = None installExceptionHandler("cc-gui", "0.0.1") @@ -95,17 +94,17 @@ class MainWindow(): def hydrate(self): self.dumpsListStore.clear() - self.rows = self.ccdaemon.getDumps() + #self.rows = self.ccdaemon.getDumps() 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) for entry in dumplist: try: - icon = get_icon_for_package(self.theme,entry.getPackageName()) + icon = get_icon_for_package(self.theme, entry.getPackageName()) except: icon = None - self.dumpsListStore.append([icon, entry.getPackage(),entry.getExecutable(), entry.getTime("%Y.%m.%d %H:%M:%S"),entry.getCount(), entry]) + self.dumpsListStore.append([icon, entry.getPackage(), entry.getExecutable(), entry.getTime("%Y.%m.%d %H:%M:%S"), entry.getCount(), entry]) def filter_dumps(self, model, miter, data): # for later.. @@ -153,10 +152,11 @@ class MainWindow(): def on_analyze_complete_cb(self, daemon, report, pBarWindow): gobject.source_remove(self.timer) self.pBarWindow.hide() - try: - dumplist = getDumpList(self.ccdaemon) - except Exception, e: - print e +#FIXME - why we need this?? -> timeout warnings +# try: +# dumplist = getDumpList(self.ccdaemon) +# except Exception, e: +# print e if not report: gui_error_message("Unable to get report!\nDebuginfo is missing?") return diff --git a/src/Gui/ccgui.glade b/src/Gui/ccgui.glade index ee579cb4..7e7715eb 100644 --- a/src/Gui/ccgui.glade +++ b/src/Gui/ccgui.glade @@ -1,9 +1,9 @@ - + - Crash-catcher + Automatic Bug Reporting Tool GTK_WIN_POS_CENTER -- cgit