(self, msg, obj, *args, **kw)
| 29 | self.set_handlers[typekey] = handler |
| 30 | |
| 31 | def set_content(self, msg, obj, *args, **kw): |
| 32 | if msg.get_content_maintype() == 'multipart': |
| 33 | # XXX: is this error a good idea or not? We can remove it later, |
| 34 | # but we can't add it later, so do it for now. |
| 35 | raise TypeError("set_content not valid on multipart") |
| 36 | handler = self._find_set_handler(msg, obj) |
| 37 | msg.clear_content() |
| 38 | handler(msg, obj, *args, **kw) |
| 39 | |
| 40 | def _find_set_handler(self, msg, obj): |
| 41 | full_path_for_error = None |