mirror of https://gitlab.com/bashrc2/epicyon
Add exception handling
parent
ccd06e614f
commit
e60c8d65dc
7
theme.py
7
theme.py
|
@ -518,8 +518,15 @@ def _set_dyslexic_font(base_dir: str) -> bool:
|
|||
template_filename = base_dir + '/' + filename
|
||||
if not os.path.isfile(template_filename):
|
||||
continue
|
||||
|
||||
css = None
|
||||
try:
|
||||
with open(template_filename, 'r', encoding='utf-8') as fp_css:
|
||||
css = fp_css.read()
|
||||
except OSError:
|
||||
print('EX: _set_dyslexic_font unable to read ' + template_filename)
|
||||
|
||||
if css:
|
||||
css = \
|
||||
set_css_param(css, "*src",
|
||||
"url('./fonts/OpenDyslexic-Regular.woff2" +
|
||||
|
|
Loading…
Reference in New Issue