Mercurial > cpython-lru_cache-weakref
diff Python/bltinmodule.c @ 32507:682f74088602 legacy-trunk
* Fix missing return after error message is set.
* Add a test case that would have caught it.
| author | Raymond Hettinger <python@rcn.com> |
|---|---|
| date | Tue, 06 Jul 2004 13:44:41 +0000 |
| parents | d4a59230e93a |
| children | 78bd25b42d46 |
line wrap: on
line diff
--- a/Python/bltinmodule.c Tue Jul 06 01:55:14 2004 +0000 +++ b/Python/bltinmodule.c Tue Jul 06 13:44:41 2004 +0000 @@ -459,12 +459,13 @@ return NULL; if (locals != Py_None && !PyMapping_Check(locals)) { PyErr_SetString(PyExc_TypeError, "locals must be a mapping"); - return NULL; + return NULL; } if (globals != Py_None && !PyDict_Check(globals)) { PyErr_SetString(PyExc_TypeError, PyMapping_Check(globals) ? "globals must be a real dict; try eval(expr, {}, mapping)" : "globals must be a dict"); + return NULL; } if (globals == Py_None) { globals = PyEval_GetGlobals();
