stop clobbering search_string in TableWindow::__init__ . Thanks Ray!

This commit is contained in:
Eric Blade 2010-02-04 16:33:21 -05:00
parent 76f9517655
commit c10665935f
3 changed files with 13 additions and 11 deletions

View File

@ -273,6 +273,7 @@ class HUD_main(object):
table_kwargs = dict(table_name = table_name, tournament = tour_number, table_number = tab_number) table_kwargs = dict(table_name = table_name, tournament = tour_number, table_number = tab_number)
search_string = getTableTitleRe(self.config, site_name, type, **table_kwargs) search_string = getTableTitleRe(self.config, site_name, type, **table_kwargs)
# print "getTableTitleRe ", self.config, site_name, type, "=", search_string
tablewindow = Tables.Table(search_string, **table_kwargs) tablewindow = Tables.Table(search_string, **table_kwargs)
if tablewindow is None: if tablewindow is None:

View File

@ -101,7 +101,7 @@ class Table_Window(object):
self.table = int(table_number) self.table = int(table_number)
self.name = "%s - %s" % (self.tournament, self.table) self.name = "%s - %s" % (self.tournament, self.table)
elif table_name is not None: elif table_name is not None:
search_string = table_name # search_string = table_name
self.name = table_name self.name = table_name
self.tournament = None self.tournament = None
else: else:

View File

@ -50,6 +50,7 @@ class Table(Table_Window):
titles = {} titles = {}
win32gui.EnumWindows(win_enum_handler, titles) win32gui.EnumWindows(win_enum_handler, titles)
for hwnd in titles: for hwnd in titles:
if titles[hwnd] == "": continue
# print "searching ", search_string, " in ", titles[hwnd] # print "searching ", search_string, " in ", titles[hwnd]
if re.search(search_string, titles[hwnd]): if re.search(search_string, titles[hwnd]):
if 'History for table:' in titles[hwnd]: continue # Everleaf Network HH viewer window if 'History for table:' in titles[hwnd]: continue # Everleaf Network HH viewer window