Modules can return list of Responses

This commit is contained in:
Némunaire 2012-10-15 01:52:07 +02:00
parent 7de644a784
commit afcb104ed9

View File

@ -52,6 +52,10 @@ class MessageConsumer:
for r in res: for r in res:
if isinstance(r, Response): if isinstance(r, Response):
self.srv.send_response(r, self.data) self.srv.send_response(r, self.data)
elif isinstance(r, list):
for s in r:
if isinstance(s, Response):
self.srv.send_response(s, self.data)
elif isinstance(res, Response): elif isinstance(res, Response):
self.srv.send_response(res, self.data) self.srv.send_response(res, self.data)