flash: rename FileNotFoundError -> ClanError

This commit is contained in:
Jörg Thalheim
2024-09-03 10:53:17 +02:00
parent 44813d2fcc
commit e6ae896ba1

View File

@@ -45,7 +45,7 @@ def list_possible_keymaps() -> list[str]:
if not keymaps_dir.exists(): if not keymaps_dir.exists():
msg = f"Keymaps directory '{keymaps_dir}' does not exist." msg = f"Keymaps directory '{keymaps_dir}' does not exist."
raise FileNotFoundError(msg) raise ClanError(msg)
keymap_files = [] keymap_files = []
@@ -67,7 +67,7 @@ def list_possible_languages() -> list[str]:
if not locale_file.exists(): if not locale_file.exists():
msg = f"Locale file '{locale_file}' does not exist." msg = f"Locale file '{locale_file}' does not exist."
raise FileNotFoundError(msg) raise ClanError(msg)
with locale_file.open() as f: with locale_file.open() as f:
lines = f.readlines() lines = f.readlines()