From e5f4f5710d51744a7fbba33e0301fc728d532b85 Mon Sep 17 00:00:00 2001 From: Eric Blade Date: Fri, 26 Nov 2010 23:13:14 -0500 Subject: [PATCH] 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?) --- pyfpdb/HUD_main.pyw | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyfpdb/HUD_main.pyw b/pyfpdb/HUD_main.pyw index 145e9048..54484c45 100755 --- a/pyfpdb/HUD_main.pyw +++ b/pyfpdb/HUD_main.pyw @@ -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__":