[pywin32-checkins] pywin32/com/win32com/src ErrorUtils.cpp,1.21,1.22
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2005-01-25 11:11:58
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14663 Modified Files: ErrorUtils.cpp Log Message: Only pass exc_info to the logger when there is an exception! Index: ErrorUtils.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/ErrorUtils.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** ErrorUtils.cpp 7 Sep 2004 02:19:27 -0000 1.21 --- ErrorUtils.cpp 25 Jan 2005 11:11:40 -0000 1.22 *************** *** 490,497 **** // a logger from that package) PyObject *kw = PyDict_New(); ! PyObject *exc_info = Py_BuildValue("OOO", exc_typ, exc_val, exc_tb); ! if (kw) PyDict_SetItemString(kw, "exc_info", exc_info); ! Py_XDECREF(exc_info); PyObject *args = Py_BuildValue("(s)", buff); PyObject *method = PyObject_GetAttrString(logger, (char *)log_method); --- 490,498 ---- // a logger from that package) PyObject *kw = PyDict_New(); ! if (kw && exc_typ) { ! PyObject *exc_info = Py_BuildValue("OOO", exc_typ, exc_val, exc_tb); PyDict_SetItemString(kw, "exc_info", exc_info); ! Py_XDECREF(exc_info); ! } PyObject *args = Py_BuildValue("(s)", buff); PyObject *method = PyObject_GetAttrString(logger, (char *)log_method); |