[python-win32] win32gui.EnumChildWindows() "crashes" when
nochildren exists
Mark Hammond
mhammond at skippinet.com.au
Tue Mar 22 23:01:09 CET 2005
> When the method win32gui.EnumChildWindows(hwnd, callback, extra) does
> find the window for which to return children but the window
> doesn't have
> any children it crashes with the error: "pywintypes.error: (0,
> 'EnumChildWindows', 'No error message is available')".
> Shouldn't it just
> return a empty list?
Yeah, it should. This *may* be a safe change to make wrt existing
programs - a program that expects to see the exception should still work if
the code is changed to return an empty list. However, it is possible things
will break (eg, the code could be written to assume the list has at least
one entry when no exception is raised.
Feel free to open a bug at sourceforge, but I'd welcome any comments...
Mark
More information about the Python-win32
mailing list