mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-27 07:18:28 +01:00
api: open scm controlled files (#2566)
* tree: make open method use mode and encoding * api: try to open using self.tree if output not found * repo: rename OutputMissingException * test: api: test adding not cached output * api: open: exists test instead of try * repo: open: try opening from tree first * repo: open: handle missing and not cached files * repo: open: separate find out logic from opening
This commit is contained in:
committed by
Ruslan Kuprieiev
parent
156fc9d4e1
commit
d2f8cb0520
+5
-4
@@ -259,10 +259,11 @@ class ETagMismatchError(DvcException):
|
||||
)
|
||||
|
||||
|
||||
class OutputFileMissingError(DvcException):
|
||||
def __init__(self, path):
|
||||
super(OutputFileMissingError, self).__init__(
|
||||
"Can't find {} neither locally nor on remote".format(path)
|
||||
class FileMissingError(DvcException):
|
||||
def __init__(self, path, cause=None):
|
||||
super(FileMissingError, self).__init__(
|
||||
"Can't find '{}' neither locally nor on remote".format(path),
|
||||
cause=cause,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user