From 2bdb75df56a212579fa0e1dcfe68df88ee54f07a Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Wed, 2 Jan 2019 16:20:36 +0200 Subject: [PATCH] deps: use `scheme` property Signed-off-by: Ruslan Kuprieiev --- dvc/project.py | 4 ++-- dvc/stage.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dvc/project.py b/dvc/project.py index 5eebf9d39..a6f605770 100644 --- a/dvc/project.py +++ b/dvc/project.py @@ -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'])) diff --git a/dvc/stage.py b/dvc/stage.py index 59da076c1..73e0abfee 100644 --- a/dvc/stage.py +++ b/dvc/stage.py @@ -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)