Merge pull request #1352 from mroutis/fix-1316

metrics add: Raise exception when path does not exist
This commit is contained in:
Ruslan Kuprieiev
2018-11-24 20:08:19 +02:00
committed by GitHub
+3
View File
@@ -72,6 +72,9 @@ class OutputLOCAL(DependencyLOCAL):
if not self.metric:
return
if not os.path.exists(self.path):
return
if os.path.isdir(self.path):
msg = 'Directory \'{}\' cannot be used as metrics.'
raise DvcException(msg.format(self.rel_path))