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

Unified Diff: third_party/boto/bin/s3put

Issue 698893003: Update checked in version of gsutil to version 4.6 (Closed) Base URL: http://dart.googlecode.com/svn/third_party/gsutil/
Patch Set: Created 6 years, 1 month 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 | « third_party/boto/bin/route53 ('k') | third_party/boto/bin/sdbadmin » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/boto/bin/s3put
===================================================================
--- third_party/boto/bin/s3put (revision 33376)
+++ third_party/boto/bin/s3put (working copy)
@@ -173,6 +173,10 @@
_upload()
+def check_valid_region(conn, region):
+ if conn is None:
+ print 'Invalid region (%s)' % region
+ sys.exit(1)
def multipart_upload(bucketname, aws_key, aws_secret, source_path, keyname,
reduced, debug, cb, num_cb, acl='private', headers={},
@@ -183,6 +187,7 @@
"""
conn = boto.s3.connect_to_region(region, aws_access_key_id=aws_key,
aws_secret_access_key=aws_secret)
+ check_valid_region(conn, region)
conn.debug = debug
bucket = conn.get_bucket(bucketname)
@@ -334,6 +339,7 @@
connect_args['host'] = host
c = boto.s3.connect_to_region(region or DEFAULT_REGION, **connect_args)
+ check_valid_region(c, region or DEFAULT_REGION)
c.debug = debug
b = c.get_bucket(bucket_name, validate=False)
« no previous file with comments | « third_party/boto/bin/route53 ('k') | third_party/boto/bin/sdbadmin » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698