Check for existence of queue first

This commit is contained in:
David Boucha 2014-04-18 12:37:56 -06:00
parent 2cc3584ae0
commit 300bc84e3a

View File

@ -92,6 +92,8 @@ def receive_message(queue, region, num=1, opts=None, user=None):
'''
queues = list_queues(region, opts, user)
url_map = _parse_queue_list(queues)
if queue not in url_map:
return '"{0}" queue does not exist.'.format(queue)
out = _run_aws('receive-message', region, opts, user, queue=url_map[queue],
num=num)