mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Bigfix, cursor.closed contains boolean value
This commit is contained in:
+1
-1
@@ -65,6 +65,6 @@ class RestApiServer(HTTPServer, Thread):
|
||||
self.daemon = True
|
||||
|
||||
def cursor(self):
|
||||
if not self._cursor_holder or self._cursor_holder.closed != 0:
|
||||
if not self._cursor_holder or self._cursor_holder.closed:
|
||||
self._cursor_holder = self.governor.postgresql.connection().cursor()
|
||||
return self._cursor_holder
|
||||
|
||||
Reference in New Issue
Block a user