]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Ensure cursor is closed for scalar() if make_row fails
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 12 Sep 2020 20:07:50 +0000 (16:07 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 12 Sep 2020 20:07:50 +0000 (16:07 -0400)
commita4bfde4a18e50d93e44aec5c6216be8a6f9fbacb
tree271ab4178a669115ffa66f8f81a02831c53fa1ac
parent645be4aa24a06241dfeb635aee8ca7a09574d800
Ensure cursor is closed for scalar() if make_row fails

As we have some tests that are against enums which
can raise on fetch, if we call scalar() and it fails,
we need to close the cursor.  mariadb segfaults
etc. seem to have been caused by this.

Change-Id: I8261f6fe7f972ae2d8702650440fd8d71e9bce53
lib/sqlalchemy/engine/result.py