mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-09 23:10:24 +01:00
dvc: use relative paths in exceptions
Fixes #448 Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
+1
-1
@@ -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
@@ -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
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user