Commit 44fec4c8 authored by Alessia Marcolini's avatar Alessia Marcolini
Browse files

Handle Path objects

parent 0ae27f32
......@@ -24,6 +24,9 @@ def parse_configuration(config_file):
"""Loads config file if a string was passed
and returns the input if a dictionary was passed.
"""
if isinstance(config_file, Path):
config_file = str(config_file)
if isinstance(config_file, str):
with open(config_file) as json_file:
return json.load(json_file)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment