summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/subprocess.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 0d19129888..55e267fd7a 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -420,7 +420,8 @@ _active = []
def _cleanup():
for inst in _active[:]:
- if inst.poll(_deadstate=sys.maxint) >= 0:
+ res = inst.poll(_deadstate=sys.maxint)
+ if res is not None and res >= 0:
try:
_active.remove(inst)
except ValueError: