Don't fail on windows that don't have names.
This commit is contained in:
parent
3b6867df29
commit
d8cf53a2bd
|
@ -49,7 +49,7 @@ class Table(Table_Window):
|
||||||
WinListDict = CGWindowListCreateDescriptionFromArray(WinList)
|
WinListDict = CGWindowListCreateDescriptionFromArray(WinList)
|
||||||
|
|
||||||
for d in WinListDict:
|
for d in WinListDict:
|
||||||
if re.search(self.search_string, d[kCGWindowName], re.I):
|
if re.search(self.search_string, d.get(kCGWindowName, ""), re.I):
|
||||||
title = d[kCGWindowName]
|
title = d[kCGWindowName]
|
||||||
if self.check_bad_words(title): continue
|
if self.check_bad_words(title): continue
|
||||||
self.number = d[kCGWindowNumber]
|
self.number = d[kCGWindowNumber]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user