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

Method close

Lib/email/feedparser.py:184–195  ·  view source on GitHub ↗

Parse all remaining data and return the root message object.

(self)

Source from the content-addressed store, hash-verified

182 pass
183
184 def close(self):
185 """Parse all remaining data and return the root message object."""
186 self._input.close()
187 self._call_parse()
188 root = self._pop_message()
189 assert not self._msgstack
190 # Look for final set of defects
191 if root.get_content_maintype() == 'multipart' \
192 and not root.is_multipart() and not self._headersonly:
193 defect = errors.MultipartInvariantViolationDefect()
194 self.policy.handle_defect(root, defect)
195 return root
196
197 def _new_message(self):
198 if self._old_style_factory:

Callers 2

parseMethod · 0.95
parseMethod · 0.95

Calls 5

_call_parseMethod · 0.95
_pop_messageMethod · 0.95
get_content_maintypeMethod · 0.80
is_multipartMethod · 0.80
handle_defectMethod · 0.80

Tested by 1

parseMethod · 0.76