summaryrefslogtreecommitdiff
path: root/config/gr_python.m4
diff options
context:
space:
mode:
Diffstat (limited to 'config/gr_python.m4')
-rw-r--r--config/gr_python.m46
1 files changed, 4 insertions, 2 deletions
diff --git a/config/gr_python.m4 b/config/gr_python.m4
index 43ccfc015..7aef1662e 100644
--- a/config/gr_python.m4
+++ b/config/gr_python.m4
@@ -153,14 +153,16 @@ AC_DEFUN([PYTHON_CHECK_MODULE],[
try:
import $1
assert $5
-except: exit(1)'
+except ImportError, AssertionError: exit(1)
+except: pass'
dnl ########################################
dnl # import checking only
dnl ########################################
else
python_cmd='
try: import $1
-except: exit(1)'
+except ImportError: exit(1)
+except: pass'
fi
if ! $PYTHON -c "$python_cmd" 2> /dev/null; then
AC_MSG_RESULT([no])