bug fix with mongodb client
This commit is contained in:
parent
9eb46954cd
commit
4b49b0a060
2
setup.py
2
setup.py
|
@ -8,7 +8,7 @@ def read(fname):
|
||||||
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
||||||
args = {
|
args = {
|
||||||
"name":"data-transport",
|
"name":"data-transport",
|
||||||
"version":"1.2.6",
|
"version":"1.2.8",
|
||||||
"author":"The Phi Technology LLC","author_email":"info@the-phi.com",
|
"author":"The Phi Technology LLC","author_email":"info@the-phi.com",
|
||||||
"license":"MIT",
|
"license":"MIT",
|
||||||
"packages":["transport"]}
|
"packages":["transport"]}
|
||||||
|
|
|
@ -48,7 +48,7 @@ class Mongo :
|
||||||
q = self.uid in self.client[self.dbname].list_collection_names()
|
q = self.uid in self.client[self.dbname].list_collection_names()
|
||||||
return p and q
|
return p and q
|
||||||
def close(self):
|
def close(self):
|
||||||
self.db.close()
|
self.client.close()
|
||||||
|
|
||||||
class MongoReader(Mongo,Reader):
|
class MongoReader(Mongo,Reader):
|
||||||
"""
|
"""
|
||||||
|
@ -158,5 +158,7 @@ class MongoWriter(Mongo,Writer):
|
||||||
else:
|
else:
|
||||||
collection.delete_many({})
|
collection.delete_many({})
|
||||||
self.write(info)
|
self.write(info)
|
||||||
|
def close(self):
|
||||||
|
Mongo.close(self)
|
||||||
# collecton.update_one({"_id":self.uid},document,True)
|
# collecton.update_one({"_id":self.uid},document,True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue