Fix bare except clause in text.py

Replace bare `except:` with `except Exception:` to avoid catching
system-exiting exceptions like KeyboardInterrupt and SystemExit.

This follows PEP 8 best practices which recommend against bare except
clauses as they can mask unexpected errors and make debugging more difficult.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hobostay 2026-03-31 17:44:30 +08:00
parent 8c06e75004
commit d11bc53050
No known key found for this signature in database

View file

@ -194,7 +194,7 @@ class FontManager:
for record in ft_font["name"].names:
try:
value = record.toUnicode()
except:
except Exception:
continue
if record.nameID == 1 and family == "":