BigglesZX / touchpaper

Python command-line util for quick and easy launching of EC2 instances
https://pypi.python.org/pypi/touchpaper/
MIT License
0 stars 0 forks source link

Add some exception handling for boto/EC2 exceptions #4

Open BigglesZX opened 10 years ago

BigglesZX commented 10 years ago

E.g. selecting a t1.micro instance without EBS storage, or with an EBS that's too small. These exceptions are currently dumped to the shell as stack traces full of XML, which isn't friendly.

BigglesZX commented 10 years ago

Example exception:

boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>UnsupportedOperation</Code><Message>AMI 'ami-3a689f4d' with an instance-store root device is not supported for the instance type 't1.micro'.</Message></Error></Errors><RequestID>75a2c6f8-918f-4730-b6b0-a088d8008961</RequestID></Response>