Fix for #304: test for str, not "utf-8".

The code wants to produce a `str` object for the given Python version (which is the right thing to do here).
This commit is contained in:
Martijn Pieters 2013-07-25 18:21:08 +01:00
parent a1682c70d2
commit 97f1cd55ee

View File

@ -261,7 +261,7 @@ def load_path(filename):
"Load a font file, searching along the Python path." "Load a font file, searching along the Python path."
for dir in sys.path: for dir in sys.path:
if isDirectory(dir): if isDirectory(dir):
if not isinstance(filename, "utf-8"): if not isinstance(filename, str):
if bytes is str: if bytes is str:
filename = filename.encode("utf-8") filename = filename.encode("utf-8")
else: else: