From 5bb6b9480393ce2d864376595ceef463fa92f3f4 Mon Sep 17 00:00:00 2001 From: JanLJL Date: Fri, 30 Aug 2019 13:50:18 +0200 Subject: [PATCH] bugifx --- osaca/frontend.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osaca/frontend.py b/osaca/frontend.py index df88dc9..3ee41a2 100755 --- a/osaca/frontend.py +++ b/osaca/frontend.py @@ -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.' )