diff --git a/avocado/core/job.py b/avocado/core/job.py index 30a8485de4514cb5b50b8dfe88536bbf7e371f7a..0e15d9228dc93380112c9c9a5967a01a4c508f84 100644 --- a/avocado/core/job.py +++ b/avocado/core/job.py @@ -461,8 +461,8 @@ class Job(object): try: mux = multiplexer.Mux(self.args) - except IOError, details: - raise exceptions.OptionValidationError(details.strerror) + except (IOError, ValueError), details: + raise exceptions.OptionValidationError(details) self.args.test_result_total = mux.get_number_of_tests(test_suite) self._make_test_result() diff --git a/avocado/core/tree.py b/avocado/core/tree.py index 62ea6b8eb63c9e7d02d3d3cfce48e07d344eb880..cd0c0eb0b05863cda4a0c1633cbc1a6a5ac4dc20 100644 --- a/avocado/core/tree.py +++ b/avocado/core/tree.py @@ -333,6 +333,9 @@ def _create_from_yaml(path, cls_node=TreeNode): ypath = value[1] if not os.path.isabs(ypath): ypath = os.path.join(os.path.dirname(path), ypath) + if not os.path.exists(ypath): + raise ValueError("File '%s' included from '%s' does not " + "exist." % (ypath, path)) node.merge(_create_from_yaml('/:' + ypath, cls_node)) elif value[0].code == YAML_USING: if using: