r6855 - bigboard/trunk/bigboard



Author: hp
Date: 2007-10-31 16:42:06 -0500 (Wed, 31 Oct 2007)
New Revision: 6855

Modified:
   bigboard/trunk/bigboard/google_stock.py
Log:
drop all accounts from GoogleStock when delisting it

Modified: bigboard/trunk/bigboard/google_stock.py
===================================================================
--- bigboard/trunk/bigboard/google_stock.py	2007-10-31 21:35:40 UTC (rev 6854)
+++ bigboard/trunk/bigboard/google_stock.py	2007-10-31 21:42:06 UTC (rev 6855)
@@ -40,6 +40,11 @@
     def _delist_google(self):
         self.__connections.disconnect_all()
 
+        ## detach from all the accounts
+        accts = self.__googles_by_account.keys()
+        for a in accts:
+            self.__on_account_removed(a)
+
     def __on_account_added(self, acct):
         gobj = google.get_google_for_account(acct)
         gobj.add_poll_action_func(self.__action_id, lambda gobj: self.update_google_data(gobj))



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