plots: fix error when there are no plots in repo (#3940)

Consistent with `dvc metrics show/diff` behaviour.

Fixes #3925
This commit is contained in:
Ruslan Kuprieiev
2020-06-03 08:54:48 +03:00
committed by GitHub
parent 57e920aa39
commit ff54ac1bfb
3 changed files with 21 additions and 5 deletions
+8
View File
@@ -178,6 +178,14 @@ class NoMetricsError(DvcException):
)
class NoPlotsError(DvcException):
def __init__(self):
super().__init__(
"no plots in this repository. Use `--plots/--plots-no-cache` "
"options for `dvc run` to mark stage outputs as plots."
)
class YAMLFileCorruptedError(DvcException):
def __init__(self, path):
path = relpath(path)