def prettyOut(self, value):
        if sys.version_info[0] <= 2:
            numbers = tuple(( ord(x) for x in value ))
        else:
            numbers = tuple(value)
        if all(x >= 32 and x <= 126 for x in numbers):
            return str(value)
        else:
            return '0x' + ''.join(( '%.2x' % x for x in numbers ))
dataset/ETHPy150Open CouchPotato/CouchPotatoServer/libs/pyasn1/type/univ.py/OctetString.prettyOut/original