]> git.ipfire.org Git - thirdparty/psycopg.git/commit
fix(c): don't clobber an error from the server with a server disconnection
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 8 Jan 2025 00:33:52 +0000 (01:33 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 10 Jan 2025 00:39:29 +0000 (01:39 +0100)
commita8262ec89e11192379b43fd28fc288a4cd251b37
tree602bf7e8d5e1f9c37e11f30b7f9c4a64ef985119
parent07364aa05ad18b8f1cc8045963308c0f110ef469
fix(c): don't clobber an error from the server with a server disconnection

Instead of raising the exception here, return the result and let the
caller handle the exception. This might make code paths more uniform and
helps the C implementation, because we actually never call
`error_from_result()` in the Cython code.
psycopg/psycopg/generators.py
psycopg_c/psycopg_c/_psycopg/generators.pyx