Kaydet (Commit) 5cd64296 authored tarafından Aymeric Augustin's avatar Aymeric Augustin

[1.7.x] Prevented a crash in the cursor wrappers on Oracle.

Fixed #22483 (again).

Backport of 0f85103e from master
üst e32e359d
...@@ -36,8 +36,12 @@ class CursorWrapper(object): ...@@ -36,8 +36,12 @@ class CursorWrapper(object):
def __exit__(self, type, value, traceback): def __exit__(self, type, value, traceback):
# Ticket #17671 - Close instead of passing thru to avoid backend # Ticket #17671 - Close instead of passing thru to avoid backend
# specific behavior. # specific behavior. Catch errors liberally because errors in cleanup
self.close() # code aren't useful.
try:
self.close()
except self.db.Database.Error:
pass
# The following methods cannot be implemented in __getattr__, because the # The following methods cannot be implemented in __getattr__, because the
# code must run when the method is invoked, not just when it is accessed. # code must run when the method is invoked, not just when it is accessed.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment