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:
+5
-1
@@ -354,6 +354,7 @@ class HUD_main(object):
|
|||||||
self.create_HUD(new_hand_id, tablewindow, temp_key, max, poker_game, type, stat_dict, cards)
|
self.create_HUD(new_hand_id, tablewindow, temp_key, max, poker_game, type, stat_dict, cards)
|
||||||
else:
|
else:
|
||||||
log.error(_('Table "%s" no longer exists\n') % table_name)
|
log.error(_('Table "%s" no longer exists\n') % table_name)
|
||||||
|
return
|
||||||
|
|
||||||
t6 = time.time()
|
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)")
|
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()
|
self.db_connection.connection.rollback()
|
||||||
|
|
||||||
if type == "tour":
|
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__":
|
if __name__== "__main__":
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user