Skip to content

Commit

Permalink
Merge pull request #471 from dbast/font_exception
Browse files Browse the repository at this point in the history
Fix extension in font not found exception message
  • Loading branch information
newtonick authored Sep 14, 2023
2 parents b5d244a + c042041 commit 16cb15e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/seedsigner/gui/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def get_font(cls, font_name, size, file_extension: str = "ttf") -> ImageFont.Fre
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

Expand Down

0 comments on commit 16cb15e

Please sign in to comment.