From 726143e378923d3635f712188411a243f2d7efd1 Mon Sep 17 00:00:00 2001
From: Attila Farkas <x394097@fi.muni.cz>
Date: Wed, 23 Oct 2019 13:06:19 +0200
Subject: [PATCH] remove python error message on missing file

---
 modules/device_creator.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/device_creator.py b/modules/device_creator.py
index c8e2906..a6c8abb 100644
--- a/modules/device_creator.py
+++ b/modules/device_creator.py
@@ -2,6 +2,7 @@
 Jinja2 """
 
 import yaml
+import sys
 
 from modules.attribute_formatter import add_simple_commands
 from modules.provider import add_prov_attributes, add_router_specification
@@ -18,7 +19,8 @@ def open_file(file_name):
         return yaml.safe_load(input_file)
     except IOError:
         print("Error: Cannot find a required file: " + str(file_name))
-
+        sys.exit(1)
+  
 def _add_provisioning(hostname, host_definitions):
     """ Adds provisioning to the device if the file exists. """
     try:
-- 
GitLab