mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-22 22:32:23 +00:00
it cannot return None
This commit is contained in:
parent
184b9735b5
commit
52896432e1
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user