Skip to content

Commit

Permalink
Capture more general OSError instead of FileNotFoundError when trying…
Browse files Browse the repository at this point in the history
… to install fon
  • Loading branch information
dalthviz authored Oct 20, 2022
1 parent 21e2143 commit c20d090
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qtawesome/iconic_font.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ def _install_fonts(self, fonts_directory):
with winreg.OpenKey(winreg.HKEY_CURRENT_USER, FONTS_REG_PATH, 0,
winreg.KEY_SET_VALUE) as key:
winreg.SetValueEx(key, fontname, 0, winreg.REG_SZ, filename)
except FileNotFoundError:
except OSError:
# Needed to support older Windows version where
# font installation per user is not possible/related registry
# entry is not available
Expand Down

0 comments on commit c20d090

Please # to comment.