Comment 12 for bug 1773320

Revision history for this message
Martin Wilck (mwilck) wrote :

Srinivas:

The result of printable() needs to be a bytes object in python3, otherwise x.decode() fails for obvious reasons. So, if you don't like the patch reverting the if clause (the patch is fine, AFAICS),
you should at least change printable() to this:

def printable(s):
    if s:
        return s.translate(identity, unprintable)
    else:
        return b""