dvc: use relative paths in exceptions

Fixes #448

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2018-02-13 13:24:57 +02:00
parent 71f7b9da0c
commit b61ddb7494
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ class Dependency(object):
self.path = os.path.abspath(os.path.realpath(path))
if not self.path.startswith(self.project.root_dir):
raise CmdOutputOutsideOfRepoError(self.path)
raise CmdOutputOutsideOfRepoError(self.rel_path)
self.md5 = md5
+1 -1
View File
@@ -152,7 +152,7 @@ class Project(object):
try:
result += self._reproduce_stage(stages, n, force)
except Exception as ex:
raise ReproductionError(n, ex)
raise ReproductionError(stages[n].relpath, ex)
return result
def checkout(self):
+1 -1
View File
@@ -9,7 +9,7 @@ from dvc.output import Output, Dependency, OutputError
class StageCmdFailedError(DvcException):
def __init__(self, stage):
msg = 'Stage {} cmd {} failed'.format(stage.path, stage.cmd)
msg = 'Stage {} cmd {} failed'.format(stage.relpath, stage.cmd)
super(StageCmdFailedError, self).__init__(msg)