Remove check deps flag and add warning on req miss

This commit is contained in:
Victor Villas
2018-06-27 14:16:52 +00:00
parent ebee3ceae1
commit 8da7bf6638
2 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -21,6 +21,6 @@ def supported_url(url):
def Remote(project, config):
for r in REMOTES:
if r.supported(config, check_dependencies=True):
if r.supported(config):
return r(project, config)
raise DvcException('Remote \'{}\' is not supported.'.format(config))
+6 -4
View File
@@ -39,10 +39,12 @@ class RemoteBase(object):
pass
@classmethod
def supported(cls, config, check_dependencies=False):
url = config[Config.SECTION_REMOTE_URL]
deps_ok = not check_dependencies or all(cls.REQUIRES)
return cls.match(url) != None and deps_ok
def supported(cls, config):
url_ok = cls.match(config[Config.SECTION_REMOTE_URL])
deps_ok = all(cls.REQUIRES)
if url_ok and not deps_ok:
Logger.warning("URL matches but requires missing dependencies")
return url_ok and deps_ok
@classmethod
def match(cls, url):