MCPcopy Index your code
hub / github.com/python/cpython / _msgobj

Method _msgobj

Lib/test/test_email/test_email.py:4554–4559  ·  view source on GitHub ↗
(self, filename)

Source from the content-addressed store, hash-verified

4552 maxDiff = None
4553
4554 def _msgobj(self, filename):
4555 with openfile(filename, 'rb') as fp:
4556 data = fp.read()
4557 data = self.normalize_linesep_regex.sub(self.blinesep, data)
4558 msg = email.message_from_bytes(data)
4559 return msg, data
4560
4561 def _idempotent(self, msg, data, unixfrom=False):
4562 b = BytesIO()

Callers

nothing calls this directly

Calls 3

openfileFunction · 0.90
readMethod · 0.45
subMethod · 0.45

Tested by

no test coverage detected