More gracefully handle "no listeners" in fake driver

This commit is contained in:
Mark McLoughlin 2013-06-14 15:18:56 +01:00
parent badb0fa4e6
commit a32e0b42a5

View File

@ -130,6 +130,10 @@ class FakeDriver(base.BaseDriver):
return ret
return
if not listeners:
# FIXME(markmc): timeout exception
return None
# FIXME(markmc): implement round-robin delivery
listener = listeners[0]
return listener._deliver_message(ctxt, message,