Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(813)

Side by Side Diff: third_party/google-endpoints/future/backports/email/mime/nonmultipart.py

Issue 2666783008: Add google-endpoints to third_party/. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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 from __future__ import unicode_literals
7 from __future__ import division
8 from __future__ import absolute_import
9
10 __all__ = ['MIMENonMultipart']
11
12 from future.backports.email import errors
13 from future.backports.email.mime.base import MIMEBase
14
15
16 class MIMENonMultipart(MIMEBase):
17 """Base class for MIME multipart/* type messages."""
18
19 def attach(self, payload):
20 # The public API prohibits attaching multiple subparts to MIMEBase
21 # derived subtypes since none of them are, by definition, of content
22 # type multipart/*
23 raise errors.MultipartConversionError(
24 'Cannot attach additional subparts to non-multipart/*')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698