← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~allenap/maas/even-more-makefile-dhcp-stuff into lp:maas

 

Gavin Panella has proposed merging lp:~allenap/maas/even-more-makefile-dhcp-stuff into lp:maas.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~allenap/maas/even-more-makefile-dhcp-stuff/+merge/110537
-- 
https://code.launchpad.net/~allenap/maas/even-more-makefile-dhcp-stuff/+merge/110537
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~allenap/maas/even-more-makefile-dhcp-stuff into lp:maas.
=== modified file 'src/provisioningserver/tests/test_utils.py'
--- src/provisioningserver/tests/test_utils.py	2012-06-14 15:04:12 +0000
+++ src/provisioningserver/tests/test_utils.py	2012-06-15 14:48:02 +0000
@@ -162,7 +162,8 @@
         self.assertEqual(exception.returncode, error.code)
 
     def test_call_with_keyboard_interrupt(self):
-        # KeyboardInterrupt is silently ignored.
+        # KeyboardInterrupt is silently converted into SystemExit, with an
+        # exit code of 1.
 
         def raise_exception():
             raise KeyboardInterrupt()
@@ -172,4 +173,5 @@
         handler.run = lambda args: raise_exception()
         script = ActionScript("Description")
         script.register("smash", handler)
-        script(["smash"])
+        error = self.assertRaises(SystemExit, script, ["smash"])
+        self.assertEqual(1, error.code)

=== modified file 'src/provisioningserver/utils.py'
--- src/provisioningserver/utils.py	2012-06-14 15:20:52 +0000
+++ src/provisioningserver/utils.py	2012-06-15 14:48:02 +0000
@@ -157,4 +157,4 @@
             # Print error.cmd and error.output too?
             raise SystemExit(error.returncode)
         except KeyboardInterrupt:
-            pass
+            raise SystemExit(1)