def rotate(record, newpassword):
    result = False

    host = record.get('cmdr:host')
    user_dn = record.get('cmdr:userdn')

    try:
        server = Server(
            host=host,
            use_ssl=True,
            get_info=ALL)

        conn = Connection(
            server=server,
            user=user_dn,
            password=record.password,
            auto_bind=True)

        changePwdResult = conn.extend.microsoft.modify_password(user_dn, newpassword)

        if (changePwdResult == True):
            print('Password changed successfully')
            record.password = newpassword
            result = True
        else:
            print((changePwdResult) % "Server returned this message: %s")

        conn.unbind()
    except:
        print("Error during connection to AD server")

    return result
dataset/ETHPy150Open Keeper-Security/Commander/keepercommander/plugins/adpasswd/adpasswd.py/rotate/swapped operands of `%`