Commit cec72913 by Jonathan Kamens

Set logger and wait time when creating nested MongoProxy object

parent 2d47a4b6
......@@ -97,7 +97,7 @@ class MongoProxy:
"""
item = self.conn[key]
if hasattr(item, '__call__'):
return MongoProxy(item)
return MongoProxy(item, self.logger, self.wait_time)
return item
def __getattr__(self, key):
......@@ -112,7 +112,7 @@ class MongoProxy:
if key in EXECUTABLE_MONGO_METHODS:
return Executable(attr, self.logger, self.wait_time)
else:
return MongoProxy(attr)
return MongoProxy(attr, self.logger, self.wait_time)
return attr
def __call__(self, *args, **kwargs):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment