From 88574f300e8efb788e68261d62f8180dc01e0ff8 Mon Sep 17 00:00:00 2001 From: "Mr. Outis" Date: Tue, 3 Sep 2019 00:01:38 -0500 Subject: [PATCH] remote: remove unecessary else clause --- dvc/remote/base.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dvc/remote/base.py b/dvc/remote/base.py index 88a2c0bf0..860c84193 100644 --- a/dvc/remote/base.py +++ b/dvc/remote/base.py @@ -390,11 +390,10 @@ class RemoteBASE(object): raise DvcException("no possible cache types left to try out.") def _do_link(self, from_info, to_info, link_method): - # XXX: We are testing if file exists rather than if file is a link if self.exists(to_info): raise DvcException("Link '{}' already exists!".format(to_info)) - else: - link_method(from_info, to_info) + + link_method(from_info, to_info) if self.protected: self.protect(to_info)