From 60f1b37625e76180843080230bb48e05988bc341 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 31 Aug 2012 13:46:29 -0400 Subject: [PATCH] email: use absolute imports in the pgp_mime.email module. This fixes: Traceback (most recent call last): File "/usr/lib64/python2.7/site-packages/nose/loader.py", line 390, in loadTestsFromName addr.filename, addr.module) File "/usr/lib64/python2.7/site-packages/nose/importer.py", line 39, in importFromPath return self.importFromDir(dir_path, fqname) File "/usr/lib64/python2.7/site-packages/nose/importer.py", line 86, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File ".../pgp_mime/__init__.py", line 33, in from .pgp import sign, encrypt, sign_and_encrypt, decrypt, verify File ".../pgp_mime/pgp.py", line 4, in from email import message_from_bytes as _message_from_bytes ImportError: cannot import name message_from_bytes --- pgp_mime/email.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pgp_mime/email.py b/pgp_mime/email.py index 94874bc..6f61670 100644 --- a/pgp_mime/email.py +++ b/pgp_mime/email.py @@ -15,6 +15,8 @@ # You should have received a copy of the GNU General Public License along with # pgp-mime. If not, see . +from __future__ import absolute_import + from email.header import decode_header as _decode_header from email.message import Message as _Message from email.mime.text import MIMEText as _MIMEText -- 2.26.2