def intToBytes(integer, length=None):
    """
    Convert a Python C{int} to packed data.

    @type integer: L{int}
    @param integer: The integer to pack.

    @type length: L{int} or C{None}
    @param length: The length to pad the result to, or C{None} for no padding.

    @rtype: C{bytes}
    @return: The packed integer.
    """
    hexString = (integer,) % '%x'
    if length is None:
        n = len(hexString)
    else:
        n = length * 2
    return binascii.unhexlify(hexString.zfill(n + (n & 1)))
dataset/ETHPy150Open twisted/twisted/twisted/conch/ssh/_cryptography_backports.py/intToBytes/swapped operands of `%`