Skip to content

Commit a7a3491

Browse files
jet-logicjet-logic
authored andcommitted
winci getattr(e, "winerror", 0)
1 parent c2081f3 commit a7a3491

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_windows.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def kill_pid_3(
138138
if check_pid(pid) is False:
139139
return False
140140
except OSError as e:
141-
if 87 == e.winerror: # ERROR_INVALID_PARAMETER (no such process)
141+
if 87 == getattr(e, "winerror", 0): # ERROR_INVALID_PARAMETER (no such process)
142142
return False
143143
raise
144144
return True

0 commit comments

Comments
 (0)