This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.
# Copyright (C) 2002-2006 Python Software Foundation
# Author: Barry Warsaw
# Contact: email-sig@python.org
"""Base class for MIME type messages that are not multipart."""
__all__=['MIMENonMultipart']
fromemailimporterrors
fromemail.mime.baseimportMIMEBase
classMIMENonMultipart(MIMEBase):
"""Base class for MIME multipart/* type messages."""
defattach(self,payload):
# The public API prohibits attaching multiple subparts to MIMEBase
# derived subtypes since none of them are, by definition, of content
# type multipart/*
raiseerrors.MultipartConversionError(
'Cannot attach additional subparts to non-multipart/*')