mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
deps: use scheme property
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
+2
-2
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user