diff --git a/git_config.py b/git_config.py index d33c3b12..36e8d939 100644 --- a/git_config.py +++ b/git_config.py @@ -385,8 +385,11 @@ def _open_ssh(host, port): def close_ssh(): for key,p in _ssh_cache.iteritems(): - os.kill(p.pid, SIGTERM) - p.wait() + try: + os.kill(p.pid, SIGTERM) + p.wait() + catch OSError: + pass _ssh_cache.clear() d = _ssh_sock(create=False)