This commit is contained in:
JanLJL
2019-08-30 13:50:18 +02:00
parent 1948c738d1
commit 5bb6b94803

View File

@@ -28,9 +28,10 @@ class Frontend(object):
)
elif path_to_yaml:
try:
assert os.path.exists(self._path)
with open(path_to_yaml, 'r') as f:
self._data = yaml.load(f, Loader=yaml.Loader)
except AssertionError:
except (AssertionError, FileNotFoundError):
raise ValueError(
'Cannot find specified path to YAML file. Make sure the machine file exists.'
)