Return a string representation or raise a KeyError. Uses email.message.Message to create a 7bit clean string representation of the message.
(self, key)
| 81 | raise NotImplementedError('Method must be implemented by subclass') |
| 82 | |
| 83 | def get_string(self, key): |
| 84 | """Return a string representation or raise a KeyError. |
| 85 | |
| 86 | Uses email.message.Message to create a 7bit clean string |
| 87 | representation of the message.""" |
| 88 | return email.message_from_bytes(self.get_bytes(key)).as_string() |
| 89 | |
| 90 | def get_bytes(self, key): |
| 91 | """Return a byte string representation or raise a KeyError.""" |