Skip to content
Snippets Groups Projects
Commit 1f71cebd authored by Roy de Goei's avatar Roy de Goei
Browse files

SDC-545: Remove print and use correct path (somehow old code was back)

parent 7046c4ff
Branches
Tags
No related merge requests found
Pipeline #30067 passed with warnings
......@@ -42,20 +42,15 @@ def lta_on_error_print(func):
def parse_config(path=None):
default_path = expanduser("~/.siplibrc")
test_path = pkg_resources.resource_string(__name__, "etc/.siplibrc")
test_path = os.path.join(os.path.dirname(__file__), "etc/.siplibrc")
config = ConfigParser()
if path:
config_paths = [path]
else:
config_paths = [default_path, test_path]
print("RGOE")
print(config_paths)
print("-------------------------------")
found = config.read(config_paths)
print(found)
if not found:
raise SystemExit(f'Cannot find configuration file in {config_paths}: please create one')
return config
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment