def dump_body(m, body):
 body = (m.body if (body is None) else body)
 if isinstance(body, buffer_t):
  body = bytes_t(body)
 return u'{0} ({1}b)'.format(truncate(safe_repr(body), 1024), len(m.body))

def dump_body ( m , body ) : body = ( m . body if ( body is None ) else body ) if isinstance ( body , buffer_t ) : body = bytes_t ( body ) return u'{0} ({1}b)' . format ( truncate ( safe_repr ( body ) , 1024 ) , len ( m . body ) )
format message body for debugging purposes .