diff --git a/corrlib/tools.py b/corrlib/tools.py index e75e1cc..9ce194b 100644 --- a/corrlib/tools.py +++ b/corrlib/tools.py @@ -89,6 +89,7 @@ def set_config(path: Path, section: str, option: str, value: Any) -> None: value: Any The value we set the option to. """ + path = Path(path) config_path = path / CONFIG_FILENAME config = ConfigParser() if os.path.exists(config_path): @@ -115,6 +116,7 @@ def get_db_file(path: Path) -> Path: db_file: str The file holding the database. """ + path = Path(path) if not os.path.exists(path): raise FileNotFoundError(f"Corrlib path {path} does not exist.") config_path = path / CONFIG_FILENAME @@ -142,6 +144,7 @@ def cache_enabled(path: Path) -> bool: cached_bool: bool Whether the given library is cached. """ + path = Path(path) config_path = path / CONFIG_FILENAME config = ConfigParser() if os.path.exists(config_path):