From c0420412cf265a4f4586dbc2b6fa9d9638abef22 Mon Sep 17 00:00:00 2001 From: Daniel Bast <2790401+dbast@users.noreply.github.com> Date: Mon, 4 Sep 2023 11:45:20 +0200 Subject: [PATCH] Fix font not found exception message The exception had the `.ttf` extension hardcoded, which lead to error messages like `seedsigner-icons.ttf` not found. That is missleading as there only is a `seedsigner-icons.otf` file. --- src/seedsigner/gui/components.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/seedsigner/gui/components.py b/src/seedsigner/gui/components.py index 7290a98e..ea32b964 100644 --- a/src/seedsigner/gui/components.py +++ b/src/seedsigner/gui/components.py @@ -215,7 +215,7 @@ class Fonts(Singleton): cls.fonts[font_name][size] = ImageFont.truetype(os.path.join(cls.font_path, f"{font_name}.{file_extension}"), size) except OSError as e: if "cannot open resource" in str(e): - raise Exception(f"Font {font_name}.ttf not found: {repr(e)}") + raise Exception(f"Font {font_name}.{file_extension} not found: {repr(e)}") else: raise e