add error handling for init

This commit is contained in:
chrys87 2016-09-15 11:32:16 +02:00 committed by GitHub
parent 65e1d39f26
commit 1cc8bc4ddf

View File

@ -14,9 +14,12 @@ from utils import debug
class fenrir():
def __init__(self):
self.environment = settingsManager.settingsManager().initFenrirConfig()
if not self.environment:
try:
self.environment = settingsManager.settingsManager().initFenrirConfig()
if not self.environment:
raise RuntimeError('Cannot Initialize. Maybe the configfile is not available or not parseable')
except RuntimeError:
raise
signal.signal(signal.SIGINT, self.captureSignal)
def proceed(self):