Mercurial > kallithea
changeset 7896:8dbe46ca608f
vcs: close SubprocessIOChunker after use - it has a close method, so let's make sure we use it
It might not be strictly necessary, but it might free some resources earlier.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Thu, 03 Oct 2019 22:52:53 +0200 |
parents | 0288dd052033 |
children | 0666876afad7 |
files | kallithea/lib/vcs/backends/git/repository.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/vcs/backends/git/repository.py Thu Oct 03 23:02:07 2019 +0200 +++ b/kallithea/lib/vcs/backends/git/repository.py Thu Oct 03 22:52:53 2019 +0200 @@ -144,7 +144,10 @@ else: raise RepositoryError(tb_err) - return ''.join(p.output), ''.join(p.error) + try: + return ''.join(p.output), ''.join(p.error) + finally: + p.close() def run_git_command(self, cmd): opts = {}