(self, _subtype, *args, _disp=None, **kw)
| 1181 | self._make_multipart('mixed', (), boundary) |
| 1182 | |
| 1183 | def _add_multipart(self, _subtype, *args, _disp=None, **kw): |
| 1184 | if (self.get_content_maintype() != 'multipart' or |
| 1185 | self.get_content_subtype() != _subtype): |
| 1186 | getattr(self, 'make_' + _subtype)() |
| 1187 | part = type(self)(policy=self.policy) |
| 1188 | part.set_content(*args, **kw) |
| 1189 | if _disp and 'content-disposition' not in part: |
| 1190 | part['Content-Disposition'] = _disp |
| 1191 | self.attach(part) |
| 1192 | |
| 1193 | def add_related(self, *args, **kw): |
| 1194 | self._add_multipart('related', *args, _disp='inline', **kw) |
no test coverage detected