develop #41
1 changed files with 3 additions and 0 deletions
HOTFIX: ensure path casting in tools
commit
fbf802959a
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue