Ajout du destructeur de la classe Database
This commit is contained in:
parent
2741e3ae5e
commit
792b3fca33
@ -40,6 +40,9 @@ class Database:
|
|||||||
cursor.close()
|
cursor.close()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
def __del__(self):
|
||||||
|
self.db.close()
|
||||||
|
|
||||||
class User:
|
class User:
|
||||||
def __init__(self, user_id, username, nom, prenom, creation_date):
|
def __init__(self, user_id, username, nom, prenom, creation_date):
|
||||||
self.id = user_id
|
self.id = user_id
|
||||||
|
Loading…
Reference in New Issue
Block a user