From d68ffc3a480d4b67dd11bf3ab4485c0e7ab789e3 Mon Sep 17 00:00:00 2001 From: Craig Northway Date: Fri, 25 Jul 2014 12:13:16 +1000 Subject: Closing file handles/streams --- git/cmd.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'git/cmd.py') diff --git a/git/cmd.py b/git/cmd.py index 1d9b4efb..cbbd0a7a 100644 --- a/git/cmd.py +++ b/git/cmd.py @@ -382,6 +382,11 @@ class Git(LazyMixin): finally: proc.stdout.close() proc.stderr.close() + if proc.stdin: + proc.stdin.close() + proc.poll() + if proc.returncode is None: + proc.terminate() if self.GIT_PYTHON_TRACE == 'full': cmdstr = " ".join(command) -- cgit v1.2.1