MCPcopy Create free account
hub / github.com/canonical/cloud-init / _attach_part

Method _attach_part

cloudinit/user_data.py:344–353  ·  view source on GitHub ↗

Attach a message to an outer message. outermsg must be a MIMEMultipart. Modifies a header in the outer message to keep track of number of attachments.

(self, outer_msg, part)

Source from the content-addressed store, hash-verified

342 return fetched_count
343
344 def _attach_part(self, outer_msg, part):
345 """
346 Attach a message to an outer message. outermsg must be a MIMEMultipart.
347 Modifies a header in the outer message to keep track of number of
348 attachments.
349 """
350 part_count = self._multi_part_count(outer_msg)
351 self._process_before_attach(part, part_count + 1)
352 outer_msg.attach(part)
353 self._multi_part_count(outer_msg, part_count + 1)
354
355
356def is_skippable(part):

Callers 2

_process_msgMethod · 0.95
_explode_archiveMethod · 0.95

Calls 2

_multi_part_countMethod · 0.95

Tested by

no test coverage detected