Phillip Smyth pushed to branch issue-642-Invalid_project.conf_seen_as_missing at BuildStream / buildstream
Commits:
-
3c72b86d
by knownexus at 2018-09-14T10:17:09Z
1 changed file:
Changes:
... | ... | @@ -385,7 +385,10 @@ class Project(): |
385 | 385 |
self._project_conf = _yaml.load(projectfile)
|
386 | 386 |
except LoadError as e:
|
387 | 387 |
# Raise a more specific error here
|
388 |
- raise LoadError(LoadErrorReason.MISSING_PROJECT_CONF, str(e))
|
|
388 |
+ if e.reason == LoadErrorReason.MISSING_FILE:
|
|
389 |
+ raise LoadError(LoadErrorReason.MISSING_PROJECT_CONF, str(e)) from e
|
|
390 |
+ else:
|
|
391 |
+ raise
|
|
389 | 392 |
|
390 | 393 |
pre_config_node = _yaml.node_copy(self._default_config_node)
|
391 | 394 |
_yaml.composite(pre_config_node, self._project_conf)
|