Code clean up

This commit is contained in:
Lukas Klass 2020-04-16 09:57:01 +02:00
parent 9e5b6e99ef
commit 00aa567eda

View File

@ -55,23 +55,23 @@ class Configuration(object):
""" """
conf = None conf = None
def __init__(self, filename="esbo-etc_defaults.xml"): def __init__(self, file="esbo-etc_defaults.xml"):
""" """
Parse a XML configuration file. Parse a XML configuration file.
Parameters Parameters
---------- ----------
filename : str file : str
configuration file to parse configuration file to parse
""" """
# Check if configuration file exists # Check if configuration file exists
if not os.path.exists(filename): if not os.path.exists(file):
error("Configuration file '" + filename + "' doesn't exist.") error("Configuration file '" + file + "' doesn't exist.")
# Read configuration file # Read configuration file
logging.info("Reading configuration from file '" + filename + "'.") logging.info("Reading configuration from file '" + file + "'.")
self.conf = self.parser(eT.parse(filename).getroot()) self.conf = self.parser(eT.parse(file).getroot())
self.calc_metaoptions() self.calc_metaoptions()