File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -531,23 +531,25 @@ def createFontList(fontfiles, fontext='ttf'):
531
531
continue
532
532
try :
533
533
prop = afmFontProperty (fpath , font )
534
- except KeyError :
534
+ except KeyError as exc :
535
+ _log .info ("Could not extract properties for %s: %s" ,
536
+ fpath , exc )
535
537
continue
536
538
else :
537
539
try :
538
540
font = ft2font .FT2Font (fpath )
539
- except RuntimeError :
540
- _log .info ("Could not open font file %s" , fpath )
541
+ except ( OSError , RuntimeError ) as exc :
542
+ _log .info ("Could not open font file %s: %s " , fpath , exc )
541
543
continue
542
544
except UnicodeError :
543
545
_log .info ("Cannot handle unicode filenames" )
544
546
continue
545
- except OSError :
546
- _log .info ("IO error - cannot open font file %s" , fpath )
547
- continue
548
547
try :
549
548
prop = ttfFontProperty (font )
550
- except (KeyError , RuntimeError , ValueError , NotImplementedError ):
549
+ except (KeyError , RuntimeError , ValueError ,
550
+ NotImplementedError ) as exc :
551
+ _log .info ("Could not extract properties for %s: %s" ,
552
+ fpath , exc )
551
553
continue
552
554
553
555
fontlist .append (prop )
You can’t perform that action at this time.
0 commit comments