Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Add test for ResultSet to accomodate non-standard response from OpenS…
Browse files Browse the repository at this point in the history
…tack. Closes #275.
  • Loading branch information
garnaat committed Jul 25, 2011
1 parent 54a4651 commit 4283ab4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions boto/ec2/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand All @@ -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])
Expand Down

0 comments on commit 4283ab4

Please sign in to comment.