PyXR

c:\python24\lib \ email \ MIMENonMultipart.py



0001 # Copyright (C) 2002-2004 Python Software Foundation
0002 # Author: Barry Warsaw
0003 # Contact: email-sig@python.org
0004 
0005 """Base class for MIME type messages that are not multipart."""
0006 
0007 from email import Errors
0008 from email import MIMEBase
0009 
0010 
0011 
0012 class MIMENonMultipart(MIMEBase.MIMEBase):
0013     """Base class for MIME multipart/* type messages."""
0014 
0015     __pychecker__ = 'unusednames=payload'
0016 
0017     def attach(self, payload):
0018         # The public API prohibits attaching multiple subparts to MIMEBase
0019         # derived subtypes since none of them are, by definition, of content
0020         # type multipart/*
0021         raise Errors.MultipartConversionError(
0022             'Cannot attach additional subparts to non-multipart/*')
0023 
0024     del __pychecker__
0025 

Generated by PyXR 0.9.4
SourceForge.net Logo