diff options
Diffstat (limited to 'Lib/email/_policybase.py')
-rw-r--r-- | Lib/email/_policybase.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/email/_policybase.py b/Lib/email/_policybase.py index c0d98a4..d699484 100644 --- a/Lib/email/_policybase.py +++ b/Lib/email/_policybase.py @@ -154,6 +154,8 @@ class Policy(_PolicyBase, metaclass=abc.ABCMeta): them. This is used when the message is being serialized by a generator. Default: True. + message_factory -- the class to use to create new message objects. + """ raise_on_defect = False @@ -161,6 +163,8 @@ class Policy(_PolicyBase, metaclass=abc.ABCMeta): cte_type = '8bit' max_line_length = 78 mangle_from_ = False + # XXX To avoid circular imports, this is set in email.message. + message_factory = None def handle_defect(self, obj, defect): """Based on policy, either raise defect or call register_defect. |