diff options
author | Guido van Rossum <guido@python.org> | 2006-03-07 18:31:44 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2006-03-07 18:31:44 (GMT) |
commit | 9d7855076a8e030e30459de685e762f63bdecac6 (patch) | |
tree | 89e348b8e41a26e288487b9cea6b057543981dec /Python/pythonrun.c | |
parent | ec73cd4b1a6104461d795b6f9408bf8227e0ddde (diff) | |
download | cpython-9d7855076a8e030e30459de685e762f63bdecac6.zip cpython-9d7855076a8e030e30459de685e762f63bdecac6.tar.gz cpython-9d7855076a8e030e30459de685e762f63bdecac6.tar.bz2 |
Address an coverity issue. Coverity was complaining about a line that's fine,
but an earlier line checked for v != NULL unnecessarily.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 38f9c11..7b1f264 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -1026,6 +1026,7 @@ PyErr_PrintEx(int set_sys_last_vars) PyErr_NormalizeException(&exception, &v, &tb); if (exception == NULL) return; + /* Now we know v != NULL too */ if (set_sys_last_vars) { PySys_SetObject("last_type", exception); PySys_SetObject("last_value", v); @@ -1034,7 +1035,7 @@ PyErr_PrintEx(int set_sys_last_vars) hook = PySys_GetObject("excepthook"); if (hook) { PyObject *args = PyTuple_Pack(3, - exception, v ? v : Py_None, tb ? tb : Py_None); + exception, v, tb ? tb : Py_None); PyObject *result = PyEval_CallObject(hook, args); if (result == NULL) { PyObject *exception2, *v2, *tb2; |