summaryrefslogtreecommitdiff
path: root/OpenSSL/__init__.py
diff options
context:
space:
mode:
authorJean-Paul Calderone <exarkun@divmod.com>2010-08-11 22:41:49 -0400
committerJean-Paul Calderone <exarkun@divmod.com>2010-08-11 22:41:49 -0400
commit297294ef009efa1b39d888c0eb28885185fb9635 (patch)
treec3e7267ec54632c5b698cb9c7e3d2478dc44999e /OpenSSL/__init__.py
parente628465b01666d1c8ea8cdaca39197fd970b3485 (diff)
downloadpyopenssl-297294ef009efa1b39d888c0eb28885185fb9635.tar.gz
Hack up module import like mad
This is a workaround for the loss of PyCObject
Diffstat (limited to 'OpenSSL/__init__.py')
-rw-r--r--OpenSSL/__init__.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSSL/__init__.py b/OpenSSL/__init__.py
index 6f393ff..e88b141 100644
--- a/OpenSSL/__init__.py
+++ b/OpenSSL/__init__.py
@@ -8,5 +8,16 @@
"""
pyOpenSSL - A simple wrapper around the OpenSSL library
"""
-import rand, crypto, SSL, tsafe
-from version import __version__
+
+import sys
+orig = sys.getdlopenflags()
+sys.setdlopenflags(2|256)
+from OpenSSL import crypto
+sys.setdlopenflags(orig)
+del sys, orig
+
+from OpenSSL import rand, SSL, tsafe
+from OpenSSL.version import __version__
+
+__all__ = [
+ 'rand', 'crypto', 'SSL', 'tsafe', '__version__']