python-seafile icon indicating copy to clipboard operation
python-seafile copied to clipboard

utils.py has a bug

Open xiaobaiyang-programer opened this issue 4 years ago • 0 comments

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):

xiaobaiyang-programer avatar Apr 08 '20 06:04 xiaobaiyang-programer