Commit 53d97e4f authored by Shai Berger's avatar Shai Berger
Browse files

Made sure cursor.close() does not complain if cursor is already closed on Oracle

Refs #22483
parent 25209715
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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))