close function for mongodb

This commit is contained in:
Steve Nyemba 2020-10-06 15:26:06 -05:00
parent e4a1ef8dd7
commit 18d6ff90fe
1 changed files with 2 additions and 0 deletions

View File

@ -47,6 +47,8 @@ class Mongo :
p = self.dbname in self.client.list_database_names()
q = self.uid in self.client[self.dbname].list_collection_names()
return p and q
def close(self):
self.db.close()
class MongoReader(Mongo,Reader):
"""