]> 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>
Wed, 8 Jan 2025 12:41:56 +0000 (13:41 +0100)
commit2b8ab6836d2997acae2e9d022e4dfad71c1beff7
treef56b2bfb91ebebd6ec48be91bc26bf9a7fa6595e
parente5121d95b81f14efb011460c70973966f112c5d5
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