diff options
author | Federico Caselli <cfederico87@gmail.com> | 2021-03-29 21:58:38 +0200 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-03-30 19:13:58 -0400 |
commit | 3df6a3f1fbb589110c3ef3f344758bb11d3dc3df (patch) | |
tree | 1bbae67210743eb3c51013300ad6aaf9bbcc1754 /lib/sqlalchemy/engine/cursor.py | |
parent | 6d21db90147411790b811be573f7cc347f5bf1bf (diff) | |
download | sqlalchemy-3df6a3f1fbb589110c3ef3f344758bb11d3dc3df.tar.gz |
Repair exception handling in CursorResult
Fixes: #6138
Change-Id: I794a3da688fd8577fb06770ef02bf827a5c55397
Diffstat (limited to 'lib/sqlalchemy/engine/cursor.py')
-rw-r--r-- | lib/sqlalchemy/engine/cursor.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/engine/cursor.py b/lib/sqlalchemy/engine/cursor.py index b5b92b171..5a3b92901 100644 --- a/lib/sqlalchemy/engine/cursor.py +++ b/lib/sqlalchemy/engine/cursor.py @@ -1624,7 +1624,7 @@ class BaseCursorResult(object): try: return self.context.rowcount except BaseException as e: - self.cursor_strategy.handle_exception(self, e) + self.cursor_strategy.handle_exception(self, self.cursor, e) @property def lastrowid(self): @@ -1645,7 +1645,7 @@ class BaseCursorResult(object): try: return self.context.get_lastrowid() except BaseException as e: - self.cursor_strategy.handle_exception(self, e) + self.cursor_strategy.handle_exception(self, self.cursor, e) @property def returns_rows(self): |