diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-11-05 18:22:29 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-11-05 18:22:29 +0100 |
commit | 5593dc014a41c563ba524b9303e75da46ee96bd5 (patch) | |
tree | aa63a514389df15574dbb5a03f02fafb6f4303b9 /lib/git | |
parent | 9ee861ae7a7b36a811aa4b5cc8172c5cbd6a945b (diff) | |
download | gitpython-5593dc014a41c563ba524b9303e75da46ee96bd5.tar.gz |
Fixed windows TASKKILL so it actually does something *silently*
Diffstat (limited to 'lib/git')
-rw-r--r-- | lib/git/cmd.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/git/cmd.py b/lib/git/cmd.py index fb6f2998..ab34fa58 100644 --- a/lib/git/cmd.py +++ b/lib/git/cmd.py @@ -63,7 +63,10 @@ class Git(object): os.kill(self.proc.pid, 2) # interrupt signal except AttributeError: # try windows - subprocess.call(("TASKKILL", "/T", "/PID", self.proc.pid)) + # 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. + subprocess.call(("TASKKILL /F /T /PID %s > nul" % str(self.proc.pid)), shell=True) # END exception handling def __getattr__(self, attr): |