search string for table detect changed
This commit is contained in:
parent
624ab07f85
commit
f66b8307d3
|
@ -512,7 +512,7 @@ or None if we fail to get the info """
|
|||
def getTableTitleRe(type, table_name=None, tournament = None, table_number=None):
|
||||
"Returns string to search in windows titles"
|
||||
if type=="tour":
|
||||
return "%s.+Table\s%s" % (tournament, table_number)
|
||||
return "%s.+Table.+%s" % (tournament, table_number)
|
||||
else:
|
||||
return table_name
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@ def discover_posix_by_name(c, tablename):
|
|||
|
||||
def discover_posix_tournament(c, t_number, s_number):
|
||||
"""Finds the X window for a client, given tournament and table nos."""
|
||||
search_string = "%s.+Table\s%s" % (t_number, s_number)
|
||||
search_string = "%s.+Table.+%s" % (t_number, s_number)
|
||||
for listing in os.popen('xwininfo -root -tree').readlines():
|
||||
if re.search(search_string, listing):
|
||||
return decode_xwininfo(c, listing)
|
||||
|
|
Loading…
Reference in New Issue
Block a user