]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-146102: Don't clear exception on success in odictobject.c (#151347)
authorVictor Stinner <vstinner@python.org>
Mon, 15 Jun 2026 09:46:52 +0000 (11:46 +0200)
committerGitHub <noreply@github.com>
Mon, 15 Jun 2026 09:46:52 +0000 (11:46 +0200)
commitb3b7c0025be4f9d08d5f4259b8ffc7b05fa0ba7f
tree0a8bb9e9bad56a772fd5a2d977e5298d01b25535
parentecbd31ee390634a2d420b975c9acef747e10d00a
gh-146102: Don't clear exception on success in odictobject.c (#151347)

Calling PyErr_Clear() on success can mask a pending exception.
Replace it with an assertion checking that no exception is set.
Objects/odictobject.c