MCPcopy
hub / github.com/pika/pika / encode

Method encode

pika/spec.py:469–479  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

467 return self
468
469 def encode(self):
470 pieces = list()
471 assert isinstance(self.new_secret, str_or_bytes),\
472 'A non-string value was supplied for self.new_secret'
473 value = as_bytes(self.new_secret)
474 pieces.append(struct.pack('>I', len(value)))
475 pieces.append(value)
476 assert isinstance(self.reason, str_or_bytes),\
477 'A non-string value was supplied for self.reason'
478 data.encode_short_string(pieces, self.reason)
479 return pieces
480
481 class UpdateSecretOk(amqp_object.Method):
482

Callers

nothing calls this directly

Calls 1

as_bytesFunction · 0.90

Tested by

no test coverage detected