Skip to content

Commit dfa0eac

Browse files
benthayerByron
authored andcommitted
Added exception handling for WinError6
1 parent 7493057 commit dfa0eac

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎git/cmd.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,11 @@ def __del__(self):
365365
proc.stderr.close()
366366

367367
# did the process finish already so we have a return code ?
368-
if proc.poll() is not None:
369-
return
368+
try:
369+
if proc.poll() is not None:
370+
return
371+
except OSError as ex:
372+
log.info("Ignored error after process had died: %r", ex)
370373

371374
# can be that nothing really exists anymore ...
372375
if os is None or getattr(os, 'kill', None) is None:

0 commit comments

Comments
 (0)