mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Check for existence of queue first
This commit is contained in:
parent
2cc3584ae0
commit
300bc84e3a
@ -92,6 +92,8 @@ def receive_message(queue, region, num=1, opts=None, user=None):
|
|||||||
'''
|
'''
|
||||||
queues = list_queues(region, opts, user)
|
queues = list_queues(region, opts, user)
|
||||||
url_map = _parse_queue_list(queues)
|
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],
|
out = _run_aws('receive-message', region, opts, user, queue=url_map[queue],
|
||||||
num=num)
|
num=num)
|
||||||
|
Loading…
Reference in New Issue
Block a user