diff options
Diffstat (limited to 'boto/ec2/buyreservation.py')
-rw-r--r-- | boto/ec2/buyreservation.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/boto/ec2/buyreservation.py b/boto/ec2/buyreservation.py index 7a0e6751..786d0fed 100644 --- a/boto/ec2/buyreservation.py +++ b/boto/ec2/buyreservation.py @@ -14,19 +14,21 @@ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import boto.ec2 from boto.sdb.db.property import StringProperty, IntegerProperty from boto.manage import propget +from boto.compat import six InstanceTypes = ['m1.small', 'm1.large', 'm1.xlarge', 'c1.medium', 'c1.xlarge', 'm2.xlarge', 'm2.2xlarge', 'm2.4xlarge', 'cc1.4xlarge', 't1.micro'] + class BuyReservation(object): def get_region(self, params): @@ -51,7 +53,7 @@ class BuyReservation(object): prop = StringProperty(name='zone', verbose_name='EC2 Availability Zone', choices=self.ec2.get_all_zones) params['zone'] = propget.get(prop) - + def get(self, params): self.get_region(params) self.ec2 = params['region'].connect() @@ -76,7 +78,7 @@ if __name__ == "__main__": unit_price = float(offering.fixed_price) total_price = unit_price * params['quantity'] print('!!! You are about to purchase %d of these offerings for a total of $%.2f !!!' % (params['quantity'], total_price)) - answer = raw_input('Are you sure you want to do this? If so, enter YES: ') + answer = six.moves.input('Are you sure you want to do this? If so, enter YES: ') if answer.strip().lower() == 'yes': offering.purchase(params['quantity']) else: |