ยปCore Development>Code coverage>Lib/email/mime/nonmultipart.py

Python code coverage for Lib/email/mime/nonmultipart.py

#countcontent
1n/a# Copyright (C) 2002-2006 Python Software Foundation
2n/a# Author: Barry Warsaw
3n/a# Contact: email-sig@python.org
4n/a
5n/a"""Base class for MIME type messages that are not multipart."""
6n/a
7n/a__all__ = ['MIMENonMultipart']
8n/a
9n/afrom email import errors
10n/afrom email.mime.base import MIMEBase
11n/a
12n/a
13n/a
14n/aclass MIMENonMultipart(MIMEBase):
15n/a """Base class for MIME non-multipart type messages."""
16n/a
17n/a def attach(self, payload):
18n/a # The public API prohibits attaching multiple subparts to MIMEBase
19n/a # derived subtypes since none of them are, by definition, of content
20n/a # type multipart/*
21n/a raise errors.MultipartConversionError(
22n/a 'Cannot attach additional subparts to non-multipart/*')