hide error when a window has non UTF-8 char in title
This commit is contained in:
+6
-1
@@ -231,7 +231,12 @@ def discover_nt_by_name(c, tablename):
|
|||||||
titles = {}
|
titles = {}
|
||||||
win32gui.EnumWindows(win_enum_handler, titles)
|
win32gui.EnumWindows(win_enum_handler, titles)
|
||||||
for hwnd in titles:
|
for hwnd in titles:
|
||||||
if not tablename in titles[hwnd]: continue
|
print "Tbales.py: tablename =", tablename, "title =", titles[hwnd]
|
||||||
|
try:
|
||||||
|
# this can blow up in XP on some windows, eg firefox displaying http://docs.python.org/tutorial/classes.html
|
||||||
|
if not tablename in titles[hwnd]: continue
|
||||||
|
except:
|
||||||
|
continue
|
||||||
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
|
||||||
if 'HUD:' in titles[hwnd]: continue # FPDB HUD window
|
if 'HUD:' in titles[hwnd]: continue # FPDB HUD window
|
||||||
if 'Chat:' in titles[hwnd]: continue # Some sites (FTP? PS? Others?) have seperable or seperately constructed chat windows
|
if 'Chat:' in titles[hwnd]: continue # Some sites (FTP? PS? Others?) have seperable or seperately constructed chat windows
|
||||||
|
|||||||
Reference in New Issue
Block a user