mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
PyErr_Warn is deprecated in 2.5 - goes away for 3.0
This commit is contained in:
parent
447e7c3981
commit
46fc337395
11 changed files with 40 additions and 55 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue