allow unicode filenames here, too
This commit is contained in:
parent
0269366aea
commit
8ffb8262da
2
nbt.py
2
nbt.py
@ -402,7 +402,7 @@ def load(filename="", buf = None):
|
|||||||
root TAG_Compound object. Argument can be a string containing a
|
root TAG_Compound object. Argument can be a string containing a
|
||||||
filename or an array of integers containing TAG_Compound data. """
|
filename or an array of integers containing TAG_Compound data. """
|
||||||
|
|
||||||
if filename and isinstance(filename, str):
|
if filename and isinstance(filename, (str, unicode)):
|
||||||
return loadFile(filename)
|
return loadFile(filename)
|
||||||
if isinstance(buf, str): buf = fromstring(buf, uint8)
|
if isinstance(buf, str): buf = fromstring(buf, uint8)
|
||||||
data = buf;
|
data = buf;
|
||||||
|
Reference in New Issue
Block a user