diff options
| author | Konfekt <Konfekt@users.noreply.github.com> | 2024-03-10 21:28:54 +0100 |
|---|---|---|
| committer | Konfekt <Konfekt@users.noreply.github.com> | 2024-03-10 21:42:11 +0100 |
| commit | af52f039513b11e9820ce0bf1e46596a454ebd44 (patch) | |
| tree | d5ce61eec5f81d6136a09b97f7cd6ec88aa235b6 /demo.gif | |
| parent | 5709ab1ce75f05e9b57bf052f3ad92aa74f61c16 (diff) | |
| download | vim-ai-af52f039513b11e9820ce0bf1e46596a454ebd44.tar.gz | |
Ensure role config file exists before loading to prevent errors
The problem was that the application tried to load a roles configuration file without checking whether it actually exists, potentially leading to unhandled exceptions if the file is missing.
Ensure that the roles configuration file exists before attempting to read from it; raise an exception with a clear message if the file is not found.
diff --git a/py/roles.py b/py/roles.py:
-if not os.path.exists(roles_config_path):
- raise Exception(f"Role config file does not exist: {roles_config_path}")
-
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions