def dump_body(m, body): """Format message body for debugging purposes.""" # v2 protocol does not deserialize body body = m.body if body is None else body if isinstance(body, buffer_t): body = bytes_t(body) return '{0} ({1}b)'.format(truncate(safe_repr(body), 1024), len(m.body))
def dump_body(m, body): # v2 protocol does not deserialize body body = m.body if body is None else body if isinstance(body, buffer_t): body = bytes_t(body) return '{0} ({1}b)'.format(truncate(safe_repr(body), 1024), len(m.body))
def dump_body(m, body): if isinstance(body, buffer_t): body = bytes_t(buffer) return '{0} ({1}b)'.format(truncate(safe_repr(body), 1024), len(m.body))