• Leo Le Bouter's avatar
    xattrs dict must be created first, decode xattrs as utf-8 · 001ed5c5
    Leo Le Bouter authored
    In Python, the JSON encoder cannot process bytes, the JSON
    specification also does not define a "bytes" type. We are
    constrained by this in that we cannot serialize data of bytes type.
    
    xattrs can be either strings or bytes, in practice they're likely
    representable as strings, therefore, decode as utf-8, error
    otherwise. If real world situation of xattrs in true binary format
    arise then we will rule out another solution.
    001ed5c5
main.py 4.29 KB