Skip to content

Conversation

@DinoV
Copy link
Contributor

@DinoV DinoV commented Nov 7, 2025

Per the issue - we can end up making a call with an error already set when switching from export_prefix to init_prefix - one possible solution is to just clear the error. In this case both calls are failing due to the dlopen failing. I'm not exactly sure how to add a test case for this though.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. But I would prefer to have @encukou's opinion on this change.

Comment on lines +416 to 418
} else if (PyErr_Occurred()) {
PyErr_Clear();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to check for PyErr_Occurred():

Suggested change
} else if (PyErr_Occurred()) {
PyErr_Clear();
}
}
PyErr_Clear();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants