Use static dbcusor

This commit is contained in:
2010-05-14 14:35:22 +01:00
parent 60b705ac03
commit ffa20908a6

View File

@@ -80,7 +80,9 @@ class BaseDBService(BaseService):
@property
def _dbcursor(self):
return self._db.cursor()
if not hasattr(self, '__dbcursor'):
self.__dbcursor = self._db.cursor()
return self.__dbcursor
def __del__(self):
if hasattr(self, '_db'):