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
1=== modified file 'lib/devscripts/ec2test/instance.py'
2--- lib/devscripts/ec2test/instance.py 2009-11-23 02:36:18 +0000
3+++ lib/devscripts/ec2test/instance.py 2009-11-26 20:00:34 +0000
4@@ -405,10 +405,11 @@
5 # We ignore the value of the 'shutdown' argument and always shut down
6 # unless `func` returns normally.
7 really_shutdown = True
8+ retval = None
9 try:
10 self.start()
11 try:
12- return func(*args, **kw)
13+ retval = func(*args, **kw)
14 except Exception:
15 # When running in postmortem mode, it is really helpful to see
16 # if there are any exceptions before it waits in the console
17@@ -427,6 +428,7 @@
18 finally:
19 if really_shutdown:
20 self.shutdown()
21+ return retval
22
23 def _copy_single_file(self, sftp, local_path, remote_dir):
24 """Copy `local_path` to `remote_dir` on this instance.