diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2016-04-27 12:28:03 +0000 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2016-04-27 13:32:30 +0000 |
commit | e5980ebf622e99925bc65f60634537c0951b48ca (patch) | |
tree | 918df60a55ef7f0f90cc61c3513ecb6dfbfbd2ce /morphlib/plugins | |
parent | 3158e9b562e9b8ae41aaf5f90a4fb064cd87e66d (diff) | |
download | morph-e5980ebf622e99925bc65f60634537c0951b48ca.tar.gz |
build: Give a helpful error when the file to be built is not found
Recently something regressed which meant that when building a missing
file, the result was this long unhelpful traceback:
2016-04-27 12:23:36 Deciding on task order
Traceback (most recent call last):
...
File "/src/morph/morphlib/sourceresolver.py", line 506, in create_source_pool
definitions_original_ref=original_ref)
File "/src/morph/morphlib/sourceresolver.py", line 440, in add_morphs_to_source_pool
add_to_pool, predefined_split_rules)
File "/src/morph/morphlib/sourceresolver.py", line 287, in _process_definitions_with_children
morphology = get_morphology(filename)
File "/src/morph/morphlib/sourceresolver.py", line 282, in get_morphology
filename)
File "/src/morph/morphlib/sourceresolver.py", line 255, in _get_morphology
morph = morph_loader.load_from_string(text, filename)
File "/src/morph/morphlib/morphloader.py", line 395, in load_from_string
obj = yaml.safe_load(string)
...
File "/usr/lib/python2.7/site-packages/yaml/reader.py", line 178, in update_raw
data = self.stream.read(size)
AttributeError: 'NoneType' object has no attribute 'read'
Now the error is:
ERROR: Couldn't find definition file to build: missing-file.morph
Change-Id: Iabb315c9d0ac5c7c50003db36a1b21e86fb23223
Diffstat (limited to 'morphlib/plugins')
0 files changed, 0 insertions, 0 deletions