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

Side by Side Diff: third_party/google-endpoints/future/backports/email/mime/base.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) 2001-2006 Python Software Foundation
2 # Author: Barry Warsaw
3 # Contact: email-sig@python.org
4
5 """Base class for MIME specializations."""
6 from __future__ import absolute_import, division, unicode_literals
7 from future.backports.email import message
8
9 __all__ = ['MIMEBase']
10
11
12 class MIMEBase(message.Message):
13 """Base class for MIME specializations."""
14
15 def __init__(self, _maintype, _subtype, **_params):
16 """This constructor adds a Content-Type: and a MIME-Version: header.
17
18 The Content-Type: header is taken from the _maintype and _subtype
19 arguments. Additional parameters for this header are taken from the
20 keyword arguments.
21 """
22 message.Message.__init__(self)
23 ctype = '%s/%s' % (_maintype, _subtype)
24 self.add_header('Content-Type', ctype, **_params)
25 self['MIME-Version'] = '1.0'
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698