Commit ddbda141 by Rodolphe Quiédeville

Be more explicit when failed to connect on sqs or ec2

parent 76ca39e5
...@@ -687,10 +687,15 @@ if __name__ == '__main__': ...@@ -687,10 +687,15 @@ if __name__ == '__main__':
stack_name = "{}-{}".format(args.environment, args.deployment) stack_name = "{}-{}".format(args.environment, args.deployment)
try: try:
sqs = boto.sqs.connect_to_region(args.region)
ec2 = boto.ec2.connect_to_region(args.region) ec2 = boto.ec2.connect_to_region(args.region)
except NoAuthHandlerFound: except NoAuthHandlerFound:
print 'You must be able to connect to sqs and ec2 to use this script' print 'Unable to connect to ec2 in region :{}'.format(args.region)
sys.exit(1)
try:
sqs = boto.sqs.connect_to_region(args.region)
except NoAuthHandlerFound:
print 'Unable to connect to sqs in region :{}'.format(args.region)
sys.exit(1) sys.exit(1)
if args.blessed: if args.blessed:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment