summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTatsuki Sugiura <sugi@nemui.org>2012-05-08 09:35:33 +0900
committerMateusz Dereniowski <derenio@gmail.com>2014-03-31 12:37:00 +0200
commitb137f55232155b16aa308ec4ea8d6bc994268b0d (patch)
treeb384b09a6f1625aadb6137e414656726b16c76e2
parent56cc93a548f35a0becd49a7eacde86f55ffc5dc5 (diff)
downloadgitpython-b137f55232155b16aa308ec4ea8d6bc994268b0d.tar.gz
Ignore signal exception on AutoInterrupt destructor.
When command run as subprocess, AutoInterrupt will kill the process on destructor. However, if process already finished, it raise OSError exception. This fix just ignore OSError on os.kill. Conflicts: git/cmd.py
-rw-r--r--git/cmd.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/git/cmd.py b/git/cmd.py
index c342148f..b8b27d42 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -87,6 +87,8 @@ class Git(LazyMixin):
# try to kill it
try:
os.kill(self.proc.pid, 2) # interrupt signal
+ except OSError:
+ pass # ignore error when process already died
except AttributeError:
# try windows
# for some reason, providing None for stdout/stderr still prints something. This is why