deps: use scheme property

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2019-01-02 17:43:24 +02:00
parent c5b8d098d8
commit 2bdb75df56
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -653,7 +653,7 @@ class Project(object):
info['branch'] = branch
ret = [info]
if out.path_info['scheme'] != 'local':
if out.scheme != 'local':
return ret
md5 = info[out.remote.PARAM_CHECKSUM]
@@ -1098,7 +1098,7 @@ class Project(object):
msg = "unable to find file '{}' in the pipeline".format(path)
raise DvcException(msg)
if out.path_info['scheme'] != 'local':
if out.scheme != 'local':
msg = "output '{}' scheme '{}' is not supported for metrics"
raise DvcException(msg.format(out.path, out.path_info['scheme']))
+3 -3
View File
@@ -224,7 +224,7 @@ class Stage(object):
def unprotect_outs(self):
for out in self.outs:
if out.path_info['scheme'] != 'local' or not out.exists:
if out.scheme != 'local' or not out.exists:
continue
self.project.unprotect(out.path)
@@ -292,7 +292,7 @@ class Stage(object):
return (cls.STAGE_FILE, cwd if cwd else os.getcwd())
out = outs[0]
if out.path_info['scheme'] == 'local':
if out.scheme == 'local':
path = os.path
else:
path = posixpath
@@ -583,7 +583,7 @@ class Stage(object):
def check_missing_outputs(self):
outs = [out for out in self.outs if not out.exists]
paths = [out.path if out.path_info['scheme'] != 'local' else
paths = [out.path if out.scheme != 'local' else
out.rel_path for out in outs]
if paths:
raise MissingDataSource(paths)