From b137f55232155b16aa308ec4ea8d6bc994268b0d Mon Sep 17 00:00:00 2001 From: Tatsuki Sugiura Date: Tue, 8 May 2012 09:35:33 +0900 Subject: 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 --- git/cmd.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'git/cmd.py') 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 -- cgit v1.2.1