mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Added some support to close database connections on object deletion.
This commit is contained in:
@@ -38,6 +38,10 @@ class MediawikiService(BaseService):
|
||||
|
||||
self._dbcursor = self._db.cursor()
|
||||
|
||||
def __del__(self):
|
||||
self._db.close()
|
||||
self._db = None
|
||||
|
||||
def _gen_salt(self):
|
||||
return "%x" % random.randint(0, 2147483647)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user