Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add test for ResultSet to accomodate non-standard response from OpenS…

…tack. Closes #275.
  • Loading branch information...
commit 4283ab4c9222c02a869f30d03f155c7547a29c26 1 parent 54a4651
@garnaat garnaat authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 boto/ec2/instance.py
View
9 boto/ec2/instance.py
@@ -233,7 +233,8 @@ def terminate(self):
Terminate the instance
"""
rs = self.connection.terminate_instances([self.id])
- self._update(rs[0])
+ if len(rs) > 0:
+ self._update(rs[0])
def stop(self, force=False):
"""
@@ -246,14 +247,16 @@ def stop(self, force=False):
:return: A list of the instances stopped
"""
rs = self.connection.stop_instances([self.id])
- self._update(rs[0])
+ if len(rs) > 0:
+ self._update(rs[0])
def start(self):
"""
Start the instance.
"""
rs = self.connection.start_instances([self.id])
- self._update(rs[0])
+ if len(rs) > 0:
+ self._update(rs[0])
def reboot(self):
return self.connection.reboot_instances([self.id])
Please sign in to comment.
Something went wrong with that request. Please try again.