From 1f0a57d4af1d8bfc49e0804a426bf41d74c20369 Mon Sep 17 00:00:00 2001 From: "Mr. Outis" Date: Wed, 4 Sep 2019 09:48:46 -0500 Subject: [PATCH] remote: remove unnecessary variable in `_try_links` --- dvc/remote/base.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dvc/remote/base.py b/dvc/remote/base.py index 860c84193..f6a43e5af 100644 --- a/dvc/remote/base.py +++ b/dvc/remote/base.py @@ -374,8 +374,7 @@ class RemoteBASE(object): @slow_link_guard def _try_links(self, from_info, to_info, link_types): - i = len(link_types) - while i > 0: + while link_types: link_method = getattr(self, link_types[0]) try: self._do_link(from_info, to_info, link_method) @@ -385,7 +384,6 @@ class RemoteBASE(object): msg = "Cache type '{}' is not supported: {}" logger.debug(msg.format(link_types[0], str(exc))) del link_types[0] - i -= 1 raise DvcException("no possible cache types left to try out.")