Comment 7 for bug 519301

Revision history for this message
Geert JM Vanderkelen (geertjmvdk) wrote :

You can patch it yourself if you can't wait. Replace mysql.connector.utils.int1read() with following:

def int1read(c):
    """
    Takes a byte and returns it was an integer.

    Returns integer.
    """
    if isinstance(c,int) and (c >= 0 and c < 256):
        return c

    try:
        return int('%02x' % ord(c),16)
    except:
        raise ValueError('int1read expects a byte, was %r' % c)