summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantinos Koukopoulos <koukopoulos@gmail.com>2014-01-30 20:15:25 +0200
committerKonstantinos Koukopoulos <koukopoulos@gmail.com>2014-01-30 20:15:25 +0200
commit410d04255a204d180650eaf86890e1b389a36dbc (patch)
tree06dc9ded93b19061f6e546f97588f9c371321edf
parentc8b13eae2416e92118b1d1245ece09fc574e2046 (diff)
downloadpyopenssl-410d04255a204d180650eaf86890e1b389a36dbc.tar.gz
allow tests to run even without execinfo.h
-rw-r--r--OpenSSL/test/util.py6
-rw-r--r--runtests.py5
2 files changed, 9 insertions, 2 deletions
diff --git a/OpenSSL/test/util.py b/OpenSSL/test/util.py
index 011e7da..4e4d812 100644
--- a/OpenSSL/test/util.py
+++ b/OpenSSL/test/util.py
@@ -17,7 +17,11 @@ import sys
from OpenSSL._util import exception_from_error_queue
from OpenSSL.crypto import Error
-import memdbg
+try:
+ import memdbg
+except Exception:
+ class _memdbg(object): heap = None
+ memdbg = _memdbg()
from OpenSSL._util import ffi, lib, byte_string as b
diff --git a/runtests.py b/runtests.py
index 2ec425b..13f5c4c 100644
--- a/runtests.py
+++ b/runtests.py
@@ -2,7 +2,10 @@ import sys
sys.modules['ssl'] = None
sys.modules['_hashlib'] = None
-import memdbg
+try:
+ import memdbg
+except Exception as e:
+ pass
from twisted.scripts.trial import run
run()