bug fixes: mongodb and s3 bucket

pull/1/head
Steve L. Nyemba 4 years ago
parent cbed09ea08
commit 9eb46954cd

@ -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.4", "version":"1.2.6",
"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"]}

@ -71,7 +71,7 @@ class MongoReader(Mongo,Reader):
key = 'n' key = 'n'
if 'cursor' in out and out['cursor'][key] : if 'cursor' in out and out['cursor'][key] :
r += list(out['cursor'][key]) r += list(out['cursor'][key])
elif out[key]: elif key in out and out[key]:
r.append (out[key]) r.append (out[key])
# yield out['cursor'][key] # yield out['cursor'][key]
if key not in ['firstBatch','nextBatch'] or ('cursor' in out and out['cursor']['id'] == 0) : if key not in ['firstBatch','nextBatch'] or ('cursor' in out and out['cursor']['id'] == 0) :

@ -128,8 +128,3 @@ class s3Writer(s3,Writer) :
self.s3.upload_fileobj(file,self.bucket_name,self.filename) self.s3.upload_fileobj(file,self.bucket_name,self.filename)
pass pass
if __name__ == '__main__' :
p = {'access_key':'AKIAJO7KII27XH3TCPJQ','secret_key':'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'}
reader = s3Reader(**p)
buckets = reader.buckets()
print(reader.list(name = buckets[0]))

Loading…
Cancel
Save