skip verification if file doesn not exist

This commit is contained in:
Mr. Outis
2018-11-24 11:57:19 -06:00
parent 3910eb6065
commit 43e7fec5d3
2 changed files with 3 additions and 3 deletions
+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))
-3
View File
@@ -1023,9 +1023,6 @@ class Project(object):
self._metrics_modify(path, typ, xpath)
def metrics_add(self, path, typ=None, xpath=None):
if not os.path.exists(path):
raise DvcException('File does not exist'.format(path))
if not typ:
typ = 'raw'
self._metrics_modify(path, typ, xpath)