refactor/data_backend #12
1 changed files with 2 additions and 0 deletions
throw error if not config file found
commit
aa51d5d786
|
|
@ -9,6 +9,8 @@ def get_tracker(path: str) -> str:
|
|||
config = ConfigParser()
|
||||
if os.path.exists(config_path):
|
||||
config.read(config_path)
|
||||
else:
|
||||
raise FileNotFoundError(f"No config file found in {path}.")
|
||||
tracker = config.get('core', 'tracker', fallback='datalad')
|
||||
return tracker
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue