def lotte_init_handler(sender, request, resources=None, language=None,
    **kwargs):
    user = request.user
    logger.debug("lock-addon: Started editing in Lotte")
    for resource in resources:
        try:
            lock = Lock.objects.create_update(resource, language, user)
            logger.debug("lock-addon: Lock acquired/extended: '%s'" % lock)
        except LockError, e:
            logger.debug(e.message % "lock-addon: %s")
            messages.error(request,
                           _("This translation is "
                           "locked by someone else."))
dataset/ETHPy150Open rvanlaar/easy-transifex/src/transifex/transifex/addons/locks/handlers.py/lotte_init_handler/swapped operands of `%`