diff options
author | Tristan van Berkom <tristan.vanberkom@codethink.co.uk> | 2020-06-10 14:01:34 +0900 |
---|---|---|
committer | Tristan van Berkom <tristan.vanberkom@codethink.co.uk> | 2020-06-10 15:35:50 +0900 |
commit | 202107e7151a47ff112f849f57770fa62bd30ada (patch) | |
tree | a889728d009cad202cf049e7b0da48f551b457cf | |
parent | 1386ddfa2803cf24ab329d87c15fff72343e7e20 (diff) | |
download | buildstream-202107e7151a47ff112f849f57770fa62bd30ada.tar.gz |
_yaml.pdx: Remove false presumption from EISDIR error message
Change the error message to reflect that the file is a directory,
do not suggest that it should be a .bst file, it should not be
a .bst file.
A .bst file might be expected from the loader code, which can
feel free to express that, but other files can be loaded, for
example include files.
-rw-r--r-- | src/buildstream/_yaml.pyx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buildstream/_yaml.pyx b/src/buildstream/_yaml.pyx index 373311a47..1e59b2a1c 100644 --- a/src/buildstream/_yaml.pyx +++ b/src/buildstream/_yaml.pyx @@ -283,7 +283,7 @@ cpdef MappingNode load(str filename, str shortname=None, bint copy_tree=False, o raise LoadError("Could not find file at {}".format(filename), LoadErrorReason.MISSING_FILE) from e except IsADirectoryError as e: - raise LoadError("{} is a directory. bst command expects a .bst file.".format(filename), + raise LoadError("{} is a directory".format(filename), LoadErrorReason.LOADING_DIRECTORY) from e except LoadError as e: raise LoadError("{}: {}".format(displayname, e), e.reason) from e |