summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/import.c b/Python/import.c
index bb40b68..7ac9e2a 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -1320,8 +1320,8 @@ find_module(char *fullname, char *subname, PyObject *path, char *buf,
sprintf(warnstr, "Not importing directory "
"'%.*s': missing __init__.py",
MAXPATHLEN, buf);
- if (PyErr_Warn(PyExc_ImportWarning,
- warnstr)) {
+ if (PyErr_WarnEx(PyExc_ImportWarning,
+ warnstr, 1)) {
return NULL;
}
}
@@ -1339,8 +1339,8 @@ find_module(char *fullname, char *subname, PyObject *path, char *buf,
sprintf(warnstr, "Not importing directory "
"'%.*s': missing __init__.py",
MAXPATHLEN, buf);
- if (PyErr_Warn(PyExc_ImportWarning,
- warnstr)) {
+ if (PyErr_WarnEx(PyExc_ImportWarning,
+ warnstr, 1)) {
return NULL;
}
}