mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-24 14:14:47 +03:00
Corrected error handling
This commit is contained in:
parent
3f9af46f88
commit
0ad433c963
|
@ -545,6 +545,8 @@ def truetype(font=None, size=10, index=0, encoding="", layout_engine=None):
|
|||
try:
|
||||
return freetype(font)
|
||||
except IOError:
|
||||
if not isPath(font):
|
||||
raise
|
||||
ttf_filename = os.path.basename(font)
|
||||
|
||||
dirs = []
|
||||
|
|
Loading…
Reference in New Issue
Block a user