Format message body for debugging purposes.
(m, body)
| 129 | |
| 130 | |
| 131 | def dump_body(m, body): |
| 132 | """Format message body for debugging purposes.""" |
| 133 | # v2 protocol does not deserialize body |
| 134 | body = m.body if body is None else body |
| 135 | return '{} ({}b)'.format(truncate(safe_repr(body), 1024), |
| 136 | len(m.body)) |
| 137 | |
| 138 | |
| 139 | class Consumer: |
no test coverage detected