mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-24 22:24:48 +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:
|
try:
|
||||||
return freetype(font)
|
return freetype(font)
|
||||||
except IOError:
|
except IOError:
|
||||||
|
if not isPath(font):
|
||||||
|
raise
|
||||||
ttf_filename = os.path.basename(font)
|
ttf_filename = os.path.basename(font)
|
||||||
|
|
||||||
dirs = []
|
dirs = []
|
||||||
|
|
Loading…
Reference in New Issue
Block a user