From 06ca3b7f821d6b20d0238a7058def0f198d278c0 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Sun, 2 Feb 2020 16:40:23 +0200 Subject: [PATCH] remote: bring back manual close_pools() We used to have this line previously, thinking that it was only a py2 issue, but it turned out that it happens on py3 as well. So bring this line back for now. --- dvc/main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dvc/main.py b/dvc/main.py index 829908af6b..cc4fe38aa9 100644 --- a/dvc/main.py +++ b/dvc/main.py @@ -11,6 +11,7 @@ from dvc.external_repo import clean_repos from dvc.logger import FOOTER from dvc.utils import format_link +from dvc.remote.pool import close_pools # Workaround for CPython bug. See [1] and [2] for more info. # [1] https://github.com/aws/aws-cli/blob/1.16.277/awscli/clidriver.py#L55 @@ -73,6 +74,11 @@ def main(argv=None): finally: logger.setLevel(outerLogLevel) + # Closing pools by-hand to prevent wierd messages when closing SSH + # connections. See https://github.com/iterative/dvc/issues/3248 for + # more info. + close_pools() + # Remove cached repos in the end of the call, these are anonymous # so won't be reused by any other subsequent run anyway. clean_repos()