diff options
| author | Skip Montanaro <skip@pobox.com> | 2007-08-12 11:44:53 +0000 |
|---|---|---|
| committer | Skip Montanaro <skip@pobox.com> | 2007-08-12 11:44:53 +0000 |
| commit | 46fc337395753e5b927f6dcccc549c54550b197e (patch) | |
| tree | 36c450714b34d4ee7f5ae1d1490d4a1ecac254e8 /Modules/posixmodule.c | |
| parent | 447e7c398158323af7757def0cf715fabfc707fa (diff) | |
| download | cpython-git-46fc337395753e5b927f6dcccc549c54550b197e.tar.gz | |
PyErr_Warn is deprecated in 2.5 - goes away for 3.0
Diffstat (limited to 'Modules/posixmodule.c')
| -rw-r--r-- | Modules/posixmodule.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 61ac4e6482..d710a7366e 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -5344,8 +5344,9 @@ posix_tempnam(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, "|zz:tempnam", &dir, &pfx)) return NULL; - if (PyErr_Warn(PyExc_RuntimeWarning, - "tempnam is a potential security risk to your program") < 0) + if (PyErr_WarnEx(PyExc_RuntimeWarning, + "tempnam is a potential security risk to your program", + 1) < 0) return NULL; #ifdef MS_WINDOWS @@ -5391,8 +5392,9 @@ posix_tmpnam(PyObject *self, PyObject *noargs) char buffer[L_tmpnam]; char *name; - if (PyErr_Warn(PyExc_RuntimeWarning, - "tmpnam is a potential security risk to your program") < 0) + if (PyErr_WarnEx(PyExc_RuntimeWarning, + "tmpnam is a potential security risk to your program", + 1) < 0) return NULL; #ifdef USE_TMPNAM_R |
