Merge pull request #286 from cuu/master

alias list_item encode utf8
This commit is contained in:
GNU 2019-08-22 16:30:47 +08:00 committed by GitHub
commit 98e39edcdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,8 +73,8 @@ class ListItem(object):
label_text = os.path.basename(text)
alias_file = os.path.splitext(text)[0] + ".alias"
if os.path.isfile(alias_file):
fp = open(alias_file, "r")
if os.path.isfile(alias_file.encode("utf8")):
fp = open(alias_file.encode("utf8"), "r")
alias = fp.read()
fp.close()
label_text = alias.decode("utf8")