Skip to content

Commit

Permalink
Cleaning up a perplexing implementation of get_queue that snuck in so…
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitch.Garnaat authored and Mitch.Garnaat committed Mar 26, 2008
1 parent 13514c3 commit 270a647
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions boto/sqs/connection.py
Expand Up @@ -184,12 +184,8 @@ def get_all_queues(self, prefix=''):
return rs

def get_queue(self, queue_name):
i = 0
rs = self.get_all_queues(queue_name)
for q in rs:
i += 1
if i != 1:
return None
else:
return q
if len(rs) == 1:
return rs[0]
return None

0 comments on commit 270a647

Please sign in to comment.