Index: subprocess.py =================================================================== --- subprocess.py (revision 52849) +++ subprocess.py (working copy) @@ -717,6 +717,8 @@ def _make_inheritable(self, handle): """Return a duplicate of handle, which is inheritable""" + if handle is None: + handle = -1 # INVALID_HANDLE_VALUE return DuplicateHandle(GetCurrentProcess(), handle, GetCurrentProcess(), 0, 1, DUPLICATE_SAME_ACCESS)