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

Unified Diff: third_party/boto/bin/sdbadmin

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/s3put ('k') | third_party/boto/boto/__init__.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/boto/bin/sdbadmin
===================================================================
--- third_party/boto/bin/sdbadmin (revision 33376)
+++ third_party/boto/bin/sdbadmin (working copy)
@@ -90,6 +90,11 @@
else:
domain.from_xml(file)
+def check_valid_region(conn, region):
+ if conn is None:
+ print 'Invalid region (%s)' % region
+ sys.exit(1)
+
def create_db(domain_name, region_name):
"""Create a new DB
@@ -97,6 +102,7 @@
:type domain: str
"""
sdb = boto.sdb.connect_to_region(region_name)
+ check_valid_region(sdb, region_name)
return sdb.create_domain(domain_name)
if __name__ == "__main__":
@@ -125,6 +131,7 @@
exit()
sdb = boto.sdb.connect_to_region(options.region_name)
+ check_valid_region(sdb, options.region_name)
if options.list:
for db in sdb.get_all_domains():
print db
« no previous file with comments | « third_party/boto/bin/s3put ('k') | third_party/boto/boto/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698