Merge pull request #459 from efiop/master

dvc: use relative paths in exceptions
This commit is contained in:
Ruslan Kuprieiev
2018-02-13 13:28:55 +02:00
committed by GitHub
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)