diff --git a/pyfpdb/HUD_main.pyw b/pyfpdb/HUD_main.pyw index 04476dae..e4d86670 100755 --- a/pyfpdb/HUD_main.pyw +++ b/pyfpdb/HUD_main.pyw @@ -266,7 +266,7 @@ class HUD_main(object): cards = self.get_cards(new_hand_id) table_kwargs = dict(table_name=table_name, tournament=tour_number, table_number=tab_number) tablewindow = Tables.Table(self.config, site_name, **table_kwargs) - if tablewindow is None: + if tablewindow.number is None: # If no client window is found on the screen, complain and continue if type == "tour": table_name = "%s %s" % (tour_number, tab_number) diff --git a/pyfpdb/TableWindow.py b/pyfpdb/TableWindow.py index 72151d13..c09ad40f 100644 --- a/pyfpdb/TableWindow.py +++ b/pyfpdb/TableWindow.py @@ -34,9 +34,13 @@ import gtk import gobject # FreePokerTools modules +import Configuration from HandHistoryConverter import getTableTitleRe from HandHistoryConverter import getTableNoRe +c = Configuration.Config() +log = Configuration.get_logger("logging.conf", "hud", log_dir=c.dir_log, log_file='HUD-log.txt') + # Global used for figuring out the current game being played from the title. # The dict key is a tuple of (limit type, category) for the game. # The list is the names for those games used by the supported poker sites diff --git a/pyfpdb/XTables.py b/pyfpdb/XTables.py index 10278a05..93664856 100644 --- a/pyfpdb/XTables.py +++ b/pyfpdb/XTables.py @@ -128,7 +128,7 @@ class Table(Table_Window): des_re = 'No such window with id' listing = os.popen("xwininfo -id %d -stats" % (self.number)).read() - + if listing == "": return mo = re.search(des_re, listing) if mo is not None: return None # table has been destroyed