Return a string representation or raise a KeyError. Uses email.message.Message to create a 7bit clean string representation of the message.
(self, key)
| 88 | raise NotImplementedError('Method must be implemented by subclass') |
| 89 | |
| 90 | def get_string(self, key): |
| 91 | """Return a string representation or raise a KeyError. |
| 92 | |
| 93 | Uses email.message.Message to create a 7bit clean string |
| 94 | representation of the message.""" |
| 95 | return email.message_from_bytes(self.get_bytes(key)).as_string() |
| 96 | |
| 97 | def get_bytes(self, key): |
| 98 | """Return a byte string representation or raise a KeyError.""" |