diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2017-02-25 10:23:39 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2017-02-25 10:23:39 +0100 |
commit | 88732b694068704cb151e0c4256a8e8d1adaff38 (patch) | |
tree | 794c3ac2f8824a862b2e30d69bf058b01ea90424 | |
parent | fdc8ecbc0c1d8a4b76ec653602c5ab06a9659c98 (diff) | |
download | gitpython-88732b694068704cb151e0c4256a8e8d1adaff38.tar.gz |
fix(cmd): don't try to use TASKKILL on linux
Fixes #576
-rw-r--r-- | git/cmd.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -254,14 +254,15 @@ class Git(LazyMixin): proc.terminate() proc.wait() # ensure process goes away except OSError as ex: - log.info("Ignored error after process has dies: %r", ex) + log.info("Ignored error after process had died: %r", ex) 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 # we simply use the shell and redirect to nul. Its slower than CreateProcess, question # is whether we really want to see all these messages. Its annoying no matter what. - call(("TASKKILL /F /T /PID %s 2>nul 1>nul" % str(proc.pid)), shell=True) + if is_win: + call(("TASKKILL /F /T /PID %s 2>nul 1>nul" % str(proc.pid)), shell=True) # END exception handling def __getattr__(self, attr): |