mirror of https://github.com/django/django.git
[1.7.x] Made sure cursor.close() does not complain if cursor is already closed on Oracle
Refs #22483
Backport of 53d97e4fe3
from master
This commit is contained in:
parent
bee118a701
commit
7421e1e320
|
@ -917,6 +917,13 @@ class FormatStylePlaceholderCursor(object):
|
|||
def fetchall(self):
|
||||
return tuple(_rowfactory(r, self.cursor) for r in self.cursor.fetchall())
|
||||
|
||||
def close(self):
|
||||
try:
|
||||
self.cursor.close()
|
||||
except Database.InterfaceError:
|
||||
# already closed
|
||||
pass
|
||||
|
||||
def var(self, *args):
|
||||
return VariableWrapper(self.cursor.var(*args))
|
||||
|
||||
|
|
Loading…
Reference in New Issue