Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(397)

Unified Diff: bin/cq

Issue 8386013: Merging in latest boto. (Closed) Base URL: svn://svn.chromium.org/boto
Patch Set: Redoing vendor drop by deleting and then merging. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bin/cfadmin ('k') | bin/cwutil » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/cq
diff --git a/bin/cq b/bin/cq
index 258002d56a0e0b167a5c8553a8b6542aec558a15..dd9b9144afc144e39087780f38b45ca7e716afb5 100755
--- a/bin/cq
+++ b/bin/cq
@@ -21,23 +21,25 @@
# IN THE SOFTWARE.
#
import getopt, sys
+import boto.sqs
from boto.sqs.connection import SQSConnection
from boto.exception import SQSError
def usage():
- print 'cq [-c] [-q queue_name] [-o output_file] [-t timeout]'
+ print 'cq [-c] [-q queue_name] [-o output_file] [-t timeout] [-r region]'
def main():
try:
- opts, args = getopt.getopt(sys.argv[1:], 'hcq:o:t:',
+ opts, args = getopt.getopt(sys.argv[1:], 'hcq:o:t:r:',
['help', 'clear', 'queue',
- 'output', 'timeout'])
+ 'output', 'timeout', 'region'])
except:
usage()
sys.exit(2)
queue_name = ''
output_file = ''
timeout = 30
+ region = ''
clear = False
for o, a in opts:
if o in ('-h', '--help'):
@@ -51,7 +53,12 @@ def main():
clear = True
if o in ('-t', '--timeout'):
timeout = int(a)
- c = SQSConnection()
+ if o in ('-r', '--region'):
+ region = a
+ if region:
+ c = boto.sqs.connect_to_region(region)
+ else:
+ c = SQSConnection()
if queue_name:
try:
rs = [c.create_queue(queue_name)]
« no previous file with comments | « bin/cfadmin ('k') | bin/cwutil » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698