def timy_getsum(chkstr):
    """Convert Timy 'checksum' string to an integer."""
    # assumes ord/string compat - ok for now
    return ((((ord(chkstr[0]) - 0x30) << 4) & 0xf0)
            | ((ord(chkstr[1]) - 0x30) & 0x0f))