Merge lp:~mwhudson/launchpad/ec2-test-oops into lp:launchpad

Proposed by Michael Hudson-Doyle
Status: Merged
Approved by: Jonathan Lange
Approved revision: not available
Merged at revision: not available
Proposed branch: lp:~mwhudson/launchpad/ec2-test-oops
Merge into: lp:launchpad
Diff against target: 24 lines (+3/-1)
1 file modified
lib/devscripts/ec2test/instance.py (+3/-1)
To merge this branch: bzr merge lp:~mwhudson/launchpad/ec2-test-oops
Reviewer Review Type Date Requested Status
Jonathan Lange (community) Approve
Review via email: mp+15294@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I broke ec2 test --headless -- it always killed the instance. This should fix it.

Revision history for this message
Jonathan Lange (jml) wrote :

Approved, as long as you have verified that it works.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/devscripts/ec2test/instance.py'
--- lib/devscripts/ec2test/instance.py 2009-11-23 02:36:18 +0000
+++ lib/devscripts/ec2test/instance.py 2009-11-26 20:00:34 +0000
@@ -405,10 +405,11 @@
405 # We ignore the value of the 'shutdown' argument and always shut down405 # We ignore the value of the 'shutdown' argument and always shut down
406 # unless `func` returns normally.406 # unless `func` returns normally.
407 really_shutdown = True407 really_shutdown = True
408 retval = None
408 try:409 try:
409 self.start()410 self.start()
410 try:411 try:
411 return func(*args, **kw)412 retval = func(*args, **kw)
412 except Exception:413 except Exception:
413 # When running in postmortem mode, it is really helpful to see414 # When running in postmortem mode, it is really helpful to see
414 # if there are any exceptions before it waits in the console415 # if there are any exceptions before it waits in the console
@@ -427,6 +428,7 @@
427 finally:428 finally:
428 if really_shutdown:429 if really_shutdown:
429 self.shutdown()430 self.shutdown()
431 return retval
430432
431 def _copy_single_file(self, sftp, local_path, remote_dir):433 def _copy_single_file(self, sftp, local_path, remote_dir):
432 """Copy `local_path` to `remote_dir` on this instance.434 """Copy `local_path` to `remote_dir` on this instance.