Bigfix, cursor.closed contains boolean value

This commit is contained in:
Alexander Kukushkin
2015-05-24 16:00:31 +02:00
parent db34e1f458
commit 1096e04343
+1 -1
View File
@@ -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