summaryrefslogtreecommitdiff
path: root/numpy/f2py/rules.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/f2py/rules.py')
-rw-r--r--numpy/f2py/rules.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/numpy/f2py/rules.py b/numpy/f2py/rules.py
index e322226c2..9d828aea2 100644
--- a/numpy/f2py/rules.py
+++ b/numpy/f2py/rules.py
@@ -188,13 +188,12 @@ PyMODINIT_FUNC init#modulename#(void) {
#initf90modhooks#
#initcommonhooks#
#interface_usercode#
-\tif (PyErr_Occurred())
-\t\treturn -1;
#ifdef F2PY_REPORT_ATEXIT
-\ton_exit(f2py_report_on_exit,(void*)\"#modulename#\");
+\tif (! PyErr_Occurred())
+\t\ton_exit(f2py_report_on_exit,(void*)\"#modulename#\");
#endif
-return 0;
+
}
#ifdef __cplusplus
}