File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -529,23 +529,25 @@ def createFontList(fontfiles, fontext='ttf'):
529529 continue
530530 try :
531531 prop = afmFontProperty (fpath , font )
532- except KeyError :
532+ except KeyError as exc :
533+ _log .info ("Could not extract properties for %s: %s" ,
534+ fpath , exc )
533535 continue
534536 else :
535537 try :
536538 font = ft2font .FT2Font (fpath )
537- except RuntimeError :
538- _log .info ("Could not open font file %s" , fpath )
539+ except ( OSError , RuntimeError ) as exc :
540+ _log .info ("Could not open font file %s: %s " , fpath , exc )
539541 continue
540542 except UnicodeError :
541543 _log .info ("Cannot handle unicode filenames" )
542544 continue
543- except OSError :
544- _log .info ("IO error - cannot open font file %s" , fpath )
545- continue
546545 try :
547546 prop = ttfFontProperty (font )
548- except (KeyError , RuntimeError , ValueError , NotImplementedError ):
547+ except (KeyError , RuntimeError , ValueError ,
548+ NotImplementedError ) as exc :
549+ _log .info ("Could not extract properties for %s: %s" ,
550+ fpath , exc )
549551 continue
550552
551553 fontlist .append (prop )
You can’t perform that action at this time.
0 commit comments