File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ def generate_css(opts: Namespace) -> bool:
211
211
Et .register_namespace ("" , SVG_NS ["svg" ])
212
212
svg_font : Et .ElementTree = Et .parse (str (font_pth ))
213
213
font_el : Optional [Et .Element ] = svg_font .find (".//svg:defs/svg:font" , SVG_NS )
214
- if not font_el :
214
+ if font_el is None :
215
215
log .error ("Could not find a font element in %s" , font_pth .resolve ())
216
216
return False
217
217
@@ -482,7 +482,7 @@ def __read_svg_font_file(
482
482
) -> Optional [tuple [str , str , str , list [Et .Element ]]]:
483
483
font_xml : Et .ElementTree = Et .parse (fontfile )
484
484
font_el : Optional [Et .Element ] = font_xml .find ("svg:defs/svg:font" , SVG_NS )
485
- if not font_el :
485
+ if font_el is None :
486
486
log .error ("Could not find a font definition in %s." , fontfile )
487
487
return None
488
488
You can’t perform that action at this time.
0 commit comments