diff options
author | Barry Warsaw <barry@python.org> | 2002-06-02 19:05:08 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2002-06-02 19:05:08 (GMT) |
commit | 524af6f382d1d287763018abc7c6415bb3dad9b5 (patch) | |
tree | 4ffc8af7c52b7b82e0d9038852e2c9b81544f01a /Lib/email/MIMEImage.py | |
parent | 7dc865ad726d27a263143865bda59c1a70fde0db (diff) | |
download | cpython-524af6f382d1d287763018abc7c6415bb3dad9b5.zip cpython-524af6f382d1d287763018abc7c6415bb3dad9b5.tar.gz cpython-524af6f382d1d287763018abc7c6415bb3dad9b5.tar.bz2 |
Use absolute import paths for intrapackage imports.
Use MIMENonMultipart as the base class so that you can't attach() to
these non-multipart message types.
Diffstat (limited to 'Lib/email/MIMEImage.py')
-rw-r--r-- | Lib/email/MIMEImage.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Lib/email/MIMEImage.py b/Lib/email/MIMEImage.py index f0e7931a..29b0ea1 100644 --- a/Lib/email/MIMEImage.py +++ b/Lib/email/MIMEImage.py @@ -6,14 +6,13 @@ import imghdr -# Intrapackage imports -import MIMEBase -import Errors -import Encoders +from email import Errors +from email import Encoders +from email.MIMENonMultipart import MIMENonMultipart -class MIMEImage(MIMEBase.MIMEBase): +class MIMEImage(MIMENonMultipart): """Class for generating image/* type MIME documents.""" def __init__(self, _imagedata, _subtype=None, @@ -41,6 +40,6 @@ class MIMEImage(MIMEBase.MIMEBase): _subtype = imghdr.what(None, _imagedata) if _subtype is None: raise TypeError, 'Could not guess image MIME subtype' - MIMEBase.MIMEBase.__init__(self, 'image', _subtype, **_params) + MIMENonMultipart.__init__(self, 'image', _subtype, **_params) self.set_payload(_imagedata) _encoder(self) |