From 53d3432df1e4dd43785a5dce2f9fa646cb4cf723 Mon Sep 17 00:00:00 2001 From: Florian Date: Sat, 18 Feb 2017 00:23:25 +0100 Subject: [PATCH] Update boswatch.py Check for existing config.ini Without a config.ini there is no possibility to start BOSWatch; therefore it makes sense to put this check on the very beginning of the program. --- boswatch.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/boswatch.py b/boswatch.py index f25c50e..aa4dd21 100755 --- a/boswatch.py +++ b/boswatch.py @@ -30,6 +30,12 @@ from includes import checkSubprocesses # check startup of the subprocesses from includes.helper import configHandler from includes.helper import freqConverter +# +# Check for exisiting config/config.ini-file +# +if not os.path.exists(os.path.dirname(os.path.abspath(__file__))+"/config/config.ini"): + print "ERROR: No config.ini found" + exit(1) # # ArgParser