From 53b576acddad5c0615da10db3cc678ba9848c176 Mon Sep 17 00:00:00 2001 From: Stefan Reichoer Date: Wed, 1 Feb 2017 14:31:10 +0100 Subject: [PATCH] cmd.py: AutoInterrupt.__del__: Avoid some unwanted tracebacks by catching some more errors --- git/cmd.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/git/cmd.py b/git/cmd.py index 245a7f609..ba63f4a27 100644 --- a/git/cmd.py +++ b/git/cmd.py @@ -261,7 +261,12 @@ def __del__(self): # 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) + try: + call(("TASKKILL /F /T /PID %s 2>nul 1>nul" % str(proc.pid)), shell=True) + except: + pass + except: + pass # END exception handling def __getattr__(self, attr):