bigboard r7435 - trunk/bigboard/stocks/self



Author: marinaz
Date: Tue Oct 28 05:39:38 2008
New Revision: 7435
URL: http://svn.gnome.org/viewvc/bigboard?rev=7435&view=rev

Log:
Have a separate try-except block for the open dialog call, so that we don't confuse an exception it might throw with the one that can be thrown when we are getting the online accounts service.


Modified:
   trunk/bigboard/stocks/self/portfoliomanager.py

Modified: trunk/bigboard/stocks/self/portfoliomanager.py
==============================================================================
--- trunk/bigboard/stocks/self/portfoliomanager.py	(original)
+++ trunk/bigboard/stocks/self/portfoliomanager.py	Tue Oct 28 05:39:38 2008
@@ -293,9 +293,14 @@
     def __on_open_accounts_dialog(self):
         try:
             onlineaccounts_proxy = dbus.SessionBus().get_object('org.gnome.OnlineAccounts', '/onlineaccounts')
-            onlineaccounts_proxy.OpenAccountsDialog(gtk.get_current_event_time())
         except dbus.DBusException, e:
             _logger.error("onlineaccounts DBus service not available, can't open accounts dialog")
+
+        try:
+            onlineaccounts_proxy.OpenAccountsDialog(gtk.get_current_event_time())
+        except dbus.DBusException, e:
+            _logger.error(e.message)
+
         self.__hide_reset()
 
     def __on_google_gadget_add(self, but):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]