Better error message on "file not found"
This commit is contained in:
parent
0c5d94d211
commit
9860896d20
|
@ -109,7 +109,11 @@ class Questions(object):
|
|||
self._gen_error(filename, "Section element %d is not a string (type %s found)" % (n, type(sec_filename)))
|
||||
|
||||
fpath = os.path.join(basedir, sec_filename)
|
||||
sec_ysrc = None
|
||||
try:
|
||||
sec_ysrc = self._get_yaml(fpath)
|
||||
except (OSError, IOError) as e:
|
||||
raise QuestionException("Error reading question file %s: %s" % (fpath, str(e)))
|
||||
self._read_sections(sec_ysrc, fpath)
|
||||
|
||||
def _read_sections(self, ysrc, filename):
|
||||
|
|
Loading…
Reference in New Issue