Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/lib/python3.8/email/mime/nonmultipart.py @ 68:5028fdace37b
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 16:23:26 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
67:0e9998148a16 | 68:5028fdace37b |
---|---|
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 | |
14 class MIMENonMultipart(MIMEBase): | |
15 """Base class for MIME non-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/*') |