From 92918df8c5148d06d2bae795d779b2aa8c2f66ae Mon Sep 17 00:00:00 2001 From: Mika Bostrom Date: Wed, 25 Nov 2009 00:12:07 +0200 Subject: [PATCH] Attempt to catch the final race Table attributes are pulled from database but the table window itself may have disappeared. The search parameters no longer match because there is no window title to match against, so some attributes are not set at all. --- pyfpdb/HUD_main.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pyfpdb/HUD_main.py b/pyfpdb/HUD_main.py index f57ab587..89436c52 100755 --- a/pyfpdb/HUD_main.py +++ b/pyfpdb/HUD_main.py @@ -252,7 +252,13 @@ class HUD_main(object): else: tablewindow.max = max tablewindow.site = site_name - self.create_HUD(new_hand_id, tablewindow, temp_key, max, poker_game, type, stat_dict, cards) + # Test that the table window still exists + try: + _n = tablewindow.name + self.create_HUD(new_hand_id, tablewindow, temp_key, max, poker_game, type, stat_dict, cards) + except AttributeError: + sys.stderr.write('Table "%s" no longer exists\n', table_name) + self.db_connection.connection.rollback() if __name__== "__main__":