Commit cec72913 by Jonathan Kamens

Set logger and wait time when creating nested MongoProxy object

parent 2d47a4b6
...@@ -97,7 +97,7 @@ class MongoProxy: ...@@ -97,7 +97,7 @@ class MongoProxy:
""" """
item = self.conn[key] item = self.conn[key]
if hasattr(item, '__call__'): if hasattr(item, '__call__'):
return MongoProxy(item) return MongoProxy(item, self.logger, self.wait_time)
return item return item
def __getattr__(self, key): def __getattr__(self, key):
...@@ -112,7 +112,7 @@ class MongoProxy: ...@@ -112,7 +112,7 @@ class MongoProxy:
if key in EXECUTABLE_MONGO_METHODS: if key in EXECUTABLE_MONGO_METHODS:
return Executable(attr, self.logger, self.wait_time) return Executable(attr, self.logger, self.wait_time)
else: else:
return MongoProxy(attr) return MongoProxy(attr, self.logger, self.wait_time)
return attr return attr
def __call__(self, *args, **kwargs): 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