def _pack_context(msg, context):
    """Pack context into msg.

    Values for message keys need to be less than 255 chars, so we pull
    context out into a bunch of separate keys. If we want to support
    more arguments in rabbit messages, we may want to do the same
    for args at some point.

    """
    context_d = dict([(key % '_context_%s', value)
                      for (key, value) in context.to_dict().iteritems()])
    msg.update(context_d)
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/rpc/impl_kombu.py/_pack_context/swapped operands of `%`