From 293bfd9b03b6df489e33cfc421504bd85abf9a49 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Tue, 17 Sep 2024 09:48:29 -0700 Subject: [PATCH] revert --- src/main/exception.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/exception.c b/src/main/exception.c index c6d333c40..440cfa1ff 100644 --- a/src/main/exception.c +++ b/src/main/exception.c @@ -545,15 +545,11 @@ int raise_exception_with_api_call_extra_info(as_error *err, as_exc_extra_info *curr_pair = extra_info; while (curr_pair->attr_name != NULL) { if (PyObject_HasAttrString(py_exc_class, curr_pair->attr_name)) { + // TODO: leave off from here retval = PyObject_SetAttrString( py_exc_class, curr_pair->attr_name, curr_pair->py_value); if (retval == -1) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) { - PyErr_Clear(); - } - else { - goto cleanup_err_tuple; - } + goto cleanup_err_tuple; } } curr_pair++;