MNT Minor cleanup after #1385 (#1391)

This commit is contained in:
Hood Chatham 2021-03-31 11:50:26 -04:00 committed by GitHub
parent 341b88acbe
commit f011af91b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -394,8 +394,7 @@ finally:
"Conversion from python to javascript failed");
}
} else {
PyErr_SetString(internal_error,
"Internal error occurred in python2js_with_depth");
PyErr_SetString(internal_error, "Internal error occurred in python2js");
}
return NULL;
}
@ -422,6 +421,7 @@ python2js_with_depth(PyObject* x, int depth)
}
Py_DECREF(cache);
if (result == NULL || result == Js_novalue) {
result = NULL;
if (PyErr_Occurred()) {
if (!PyErr_ExceptionMatches(conversion_error)) {
_PyErr_FormatFromCause(conversion_error,