summaryrefslogtreecommitdiff
path: root/M2Crypto/BIO.py
diff options
context:
space:
mode:
authorCraig Rodrigues <rodrigc@FreeBSD.org>2015-11-17 19:55:50 -0800
committerMatěj Cepl <mcepl@cepl.eu>2016-03-20 22:19:15 +0100
commit8b33fa718947fa508f59bb8461a65e2fcb3ca6fa (patch)
tree3d1640a5d4cd34e3fb45689fa9a450d82b319fa8 /M2Crypto/BIO.py
parent0aa30e5df1fc0c03f29e1a438123097dfdaee242 (diff)
downloadm2crypto-8b33fa718947fa508f59bb8461a65e2fcb3ca6fa.tar.gz
Use the new absolute import syntax to fix Python 3. [PEP 328]
I used the output of "2to3 -f import M2Crypto" to figure out which imports needed to be fixed. In addition, I added "from __future__ import absolute_import" to all files that I touched. This brings in the new import behavior, and works as far back as Python 2.5.0a1. See: https://docs.python.org/3/library/__future__.html https://www.python.org/dev/peps/pep-0328/
Diffstat (limited to 'M2Crypto/BIO.py')
-rw-r--r--M2Crypto/BIO.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/M2Crypto/BIO.py b/M2Crypto/BIO.py
index e777d72..03f8c57 100644
--- a/M2Crypto/BIO.py
+++ b/M2Crypto/BIO.py
@@ -1,12 +1,14 @@
+from __future__ import absolute_import
+
"""M2Crypto wrapper for OpenSSL BIO API.
Copyright (c) 1999-2004 Ng Pheng Siong. All rights reserved."""
-import m2
+from . import m2
from cStringIO import StringIO
# Deprecated
-from m2 import bio_do_handshake as bio_do_ssl_handshake # noqa
+from .m2 import bio_do_handshake as bio_do_ssl_handshake
class BIOError(Exception):