1
0
Fork 0

Add pluggable transport registry

This commit is contained in:
Adam Dobrawy 2018-05-15 00:52:46 +02:00
parent 201f568750
commit 6ded51bcde
4 changed files with 18 additions and 2 deletions

View file

@ -17,3 +17,10 @@ class EmailTransport(object):
message = email.message_from_string(contents)
return message
class PluggableEmailTransport(EmailTransport):
@classmethod
def from_uri(cls, uri):
raise NotImplemented("The class does not implement {0}.from_uri, and it should. "
"Overwrite {0}.from_uri.".format(cls.__name__))