Skip to content
Snippets Groups Projects
Commit 685d18ba authored by Johannes Schumann's avatar Johannes Schumann
Browse files

Merge branch 'python' of git.km3net.de:simulation/km3buu into python

parents 28973ceb 61aa8711
No related branches found
No related tags found
1 merge request!1Merge python environment
Pipeline #12611 failed
......@@ -31,7 +31,10 @@ class Config(object):
def __init__(self, config_path=CONFIG_PATH):
self.config = ConfigParser()
self._config_path = config_path
os.makedirs(dirname(CONFIG_PATH), exist_ok=True)
if isfile(self._config_path):
self.config.read(self._config_path)
else:
os.makedirs(dirname(CONFIG_PATH), exist_ok=True)
def set(self, section, key, value):
if section not in self.config.sections():
......@@ -54,7 +57,7 @@ class Config(object):
def gibuu_image_path(self):
section = "GiBUU"
key = "image_path"
image_path = self.get(section, section)
image_path = self.get(section, key)
if image_path is None or not isfile(image_path):
dev_path = abspath(join(dirname(__file__), os.pardir, IMAGE_NAME))
if isfile(dev_path):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment