c 20022006 python software foundation barry warsaw contact emailsigpython org base class for mime type messages that are not multipart all mimenonmultipart from email import errors from email mime base import mimebase class mimenonmultipartmimebase the public api prohibits attaching multiple subparts to mimebase derived subtypes since none of them are by definition of content type multipart c 2002 2006 python software foundation barry warsaw contact email sig python org base class for mime type messages that are not multipart base class for mime non multipart type messages the public api prohibits attaching multiple subparts to mimebase derived subtypes since none of them are by definition of content type multipart
__all__ = ['MIMENonMultipart']

from email import errors
from email.mime.base import MIMEBase


class MIMENonMultipart(MIMEBase):
    

    def attach(self, payload):
        
        
        
        raise errors.MultipartConversionError(
            'Cannot attach additional subparts to non-multipart/*')