Skip to content

Narrow bare except to OSError in font fallback - #49

Merged
sjmf merged 1 commit into
sjmf:mainfrom
ranas-mukminov:fix/narrow-font-except
Nov 6, 2026
Merged

sjmf merged 1 commit into
sjmf:mainfrom
ranas-mukminov:fix/narrow-font-except

Conversation

@ranas-mukminov

Copy link
Copy Markdown
Contributor

The icon generator tries a system font and falls back to the default on any error, but the only failure ImageFont.truetype can produce for a missing or unreadable font file is OSError. This narrows the handler to OSError, so any other failure surfaces instead of silently using the fallback font. The edited file passes py_compile; no test suite was run here, so CI is the check.

@codecov

codecov Bot commented Nov 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.60%. Comparing base (dffc4d5) to head (a342e7b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #49   +/-   ##
=======================================
  Coverage   83.60%   83.60%           
=======================================
  Files          22       22           
  Lines        2220     2220           
  Branches      299      299           
=======================================
  Hits         1856     1856           
  Misses        364      364           
Flag Coverage Δ
unittests 83.60% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@sjmf

sjmf commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Looks good, thanks. Merging.

@sjmf
sjmf merged commit 5a7390d into sjmf:main Nov 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants