]> git.proxmox.com Git - mirror_edk2.git/blob - AppPkg/Applications/Python/Python-2.7.2/Lib/email/mime/nonmultipart.py
f6f857e975c6eabc9f6f6ad4efea6ab317563a75
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / email / mime / nonmultipart.py
1 # Copyright (C) 2002-2006 Python Software Foundation
2 # Author: Barry Warsaw
3 # Contact: email-sig@python.org
4
5 """Base class for MIME type messages that are not multipart."""
6
7 __all__ = ['MIMENonMultipart']
8
9 from email import errors
10 from email.mime.base import MIMEBase
11
12
13 \f
14 class MIMENonMultipart(MIMEBase):
15 """Base class for MIME multipart/* type messages."""
16
17 def attach(self, payload):
18 # The public API prohibits attaching multiple subparts to MIMEBase
19 # derived subtypes since none of them are, by definition, of content
20 # type multipart/*
21 raise errors.MultipartConversionError(
22 'Cannot attach additional subparts to non-multipart/*')