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.
This commit is contained in:
Mika Bostrom 2009-11-25 00:12:07 +02:00
parent 4db9ec7e79
commit 92918df8c5

View File

@ -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__":