python-seafile
python-seafile copied to clipboard
utils.py has a bug
def utf8lize(obj):
if isinstance(obj, dict):
return {k: to_utf8(v) for k, v in obj.items()}
if isinstance(obj, list):
return [to_utf8(x) for x in ob]
if instance(obj, str):
return obj.encode('utf-8')
return obj
should change return [to_utf8(x) for x in ob] to return [to_utf8(x) for x in obj] and ** if instance(obj, str):** should change to if isinstance(obj, str):