diff options
author | Tatsuki Sugiura <sugi@nemui.org> | 2012-05-08 09:35:33 +0900 |
---|---|---|
committer | Tatsuki Sugiura <sugi@nemui.org> | 2012-05-08 09:35:33 +0900 |
commit | f467834059bb1297df97df4e03149cd2b48b81e3 (patch) | |
tree | 38a09919773bfc17c86e222a9bf16d2d17dee416 /git/cmd.py | |
parent | cb68f36c9a2cd18a38e2b2c4630fd2131bfa3879 (diff) | |
download | gitpython-f467834059bb1297df97df4e03149cd2b48b81e3.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.
Diffstat (limited to 'git/cmd.py')
-rw-r--r-- | git/cmd.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 |