includehandler: Format LoadConfigException message nicely

This exception is always thrown with both a message and a file name.
Combine them to a single string, instead of throwing tuples.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Jan Kiszka 2017-07-11 07:57:37 +02:00 committed by Daniel Wagner
parent b30a8ebc3b
commit f3e8d9ffd8

View File

@ -46,7 +46,8 @@ class LoadConfigException(Exception):
"""
Class for exceptions that appear while loading the configuration file.
"""
pass
def __init__(self, message, filename):
super().__init__('{}: {}'.format(message, filename))
def load_config(filename):