Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / amd64 / lib / python2.4 / email / MIMENonMultipart.py
CommitLineData
920dae64
AT
1# Copyright (C) 2002-2004 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
7from email import Errors
8from email import MIMEBase
9
10
11\f
12class MIMENonMultipart(MIMEBase.MIMEBase):
13 """Base class for MIME multipart/* type messages."""
14
15 __pychecker__ = 'unusednames=payload'
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/*')
23
24 del __pychecker__