diff options
author | Skip Montanaro <skip@pobox.com> | 2007-08-12 11:44:53 (GMT) |
---|---|---|
committer | Skip Montanaro <skip@pobox.com> | 2007-08-12 11:44:53 (GMT) |
commit | 46fc337395753e5b927f6dcccc549c54550b197e (patch) | |
tree | 36c450714b34d4ee7f5ae1d1490d4a1ecac254e8 /Modules/_bsddb.c | |
parent | 447e7c398158323af7757def0cf715fabfc707fa (diff) | |
download | cpython-46fc337395753e5b927f6dcccc549c54550b197e.zip cpython-46fc337395753e5b927f6dcccc549c54550b197e.tar.gz cpython-46fc337395753e5b927f6dcccc549c54550b197e.tar.bz2 |
PyErr_Warn is deprecated in 2.5 - goes away for 3.0
Diffstat (limited to 'Modules/_bsddb.c')
-rw-r--r-- | Modules/_bsddb.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c index d03999f..149cd98 100644 --- a/Modules/_bsddb.c +++ b/Modules/_bsddb.c @@ -546,7 +546,7 @@ static int makeDBError(int err) } _db_errmsg[0] = 0; #ifdef HAVE_WARNINGS - exceptionRaised = PyErr_Warn(PyExc_RuntimeWarning, errTxt); + exceptionRaised = PyErr_WarnEx(PyExc_RuntimeWarning, errTxt, 1); #else fprintf(stderr, errTxt); fprintf(stderr, "\n"); @@ -859,8 +859,10 @@ DB_dealloc(DBObject* self) MYDB_END_ALLOW_THREADS; #ifdef HAVE_WARNINGS } else { - PyErr_Warn(PyExc_RuntimeWarning, - "DB could not be closed in destructor: DBEnv already closed"); + PyErr_WarnEx(PyExc_RuntimeWarning, + "DB could not be closed in destructor:" + " DBEnv already closed", + 1); #endif } self->db = NULL; @@ -1031,8 +1033,10 @@ DBTxn_dealloc(DBTxnObject* self) txn_abort(self->txn); #endif MYDB_END_ALLOW_THREADS; - PyErr_Warn(PyExc_RuntimeWarning, - "DBTxn aborted in destructor. No prior commit() or abort()."); + PyErr_WarnEx(PyExc_RuntimeWarning, + "DBTxn aborted in destructor. " + " No prior commit() or abort().", + 1); } #endif |