it cannot return None

This commit is contained in:
Jean-Paul Calderone 2021-01-11 13:41:54 -05:00
parent 184b9735b5
commit 52896432e1

View File

@ -132,7 +132,7 @@ def initialize():
)(("GetConsoleMode", windll.kernel32))
def not_a_console(handle):
if handle == INVALID_HANDLE_VALUE or handle is None:
if handle == INVALID_HANDLE_VALUE:
return True
return ((GetFileType(handle) & ~FILE_TYPE_REMOTE) != FILE_TYPE_CHAR
or GetConsoleMode(handle, byref(DWORD())) == 0)