Skip to content

Commit

Permalink
Merge pull request boto#2041 from ralfharing/develop
Browse files Browse the repository at this point in the history
Better error output for unknown region - fixes boto#1983, boto#2041.
  • Loading branch information
danielgtaylor committed Feb 19, 2014
2 parents a7e9b4c + 2d9785f commit cd63f92
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions bin/glacier
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,14 @@ glacier <command> [args]

def connect(region, debug_level=0, access_key=None, secret_key=None):
""" Connect to a specific region """
return connect_to_region(region,
aws_access_key_id=access_key,
aws_secret_access_key=secret_key,
debug=debug_level)
layer2 = connect_to_region(region,
aws_access_key_id=access_key,
aws_secret_access_key=secret_key,
debug=debug_level)
if layer2 is None:
print 'Invalid region (%s)' % region
sys.exit(1)
return layer2


def list_vaults(region, access_key=None, secret_key=None):
Expand Down

0 comments on commit cd63f92

Please sign in to comment.