mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-24 08:14:10 +03:00
Update src/PIL/ImageFont.py
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This commit is contained in:
parent
e4f13020e1
commit
77503156b1
|
@ -932,9 +932,9 @@ def load_path(filename: str | bytes) -> ImageFont:
|
|||
return load(os.path.join(directory, filename))
|
||||
except OSError:
|
||||
pass
|
||||
msg = f"cannot find font file '{filename}' in `sys.path`"
|
||||
msg = f"cannot find font file '{filename}' in sys.path"
|
||||
if os.path.exists(filename):
|
||||
msg += f', did you mean `ImageFont.load("{filename}")` instead?'
|
||||
msg += f', did you mean ImageFont.load("{filename}") instead?'
|
||||
|
||||
raise OSError(msg)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user