read_stdin: return if fail to find table, rather than continue along, also trap KeyError at end of func when checking tournament tables.

(maybe this'll finally fix the hud locking up on table close sometimes?)
This commit is contained in:
Eric Blade 2010-11-26 23:13:14 -05:00
parent bfa3cfc20c
commit e5f4f5710d

View File

@ -354,6 +354,7 @@ class HUD_main(object):
self.create_HUD(new_hand_id, tablewindow, temp_key, max, poker_game, type, stat_dict, cards)
else:
log.error(_('Table "%s" no longer exists\n') % table_name)
return
t6 = time.time()
log.info(_("HUD_main.read_stdin: hand read in %4.3f seconds (%4.3f,%4.3f,%4.3f,%4.3f,%4.3f,%4.3f)")
@ -361,7 +362,10 @@ class HUD_main(object):
self.db_connection.connection.rollback()
if type == "tour":
self.hud_dict[temp_key].table.check_table_no(self.hud_dict[temp_key])
try:
self.hud_dict[temp_key].table.check_table_no(self.hud_dict[temp_key])
except KeyError:
pass
if __name__== "__main__":