stuck an error print in wintables if self.window doesn't exist

This commit is contained in:
Eric Blade 2009-11-23 10:24:38 -05:00
parent 32e7a28d2c
commit a735ab67b2

View File

@ -57,9 +57,13 @@ class Table(Table_Window):
self.window = hwnd
break
try:
if self.window == None:
print "Window %s not found. Skipping." % search_string
return None
except AttributeError:
print "self.window doesn't exist? why?"
return None
(x, y, width, height) = win32gui.GetWindowRect(hwnd)
print "x = %s y = %s width = %s height = %s" % (x, y, width, height)
@ -149,4 +153,3 @@ class Table(Table_Window):
def win_enum_handler(hwnd, titles):
titles[hwnd] = win32gui.GetWindowText(hwnd)