From 5fc7c352cd6257272b380e5ecf35798649b757fb Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Sat, 18 Dec 2010 12:59:08 +0100 Subject: [PATCH] ubuntu-iso: Exit nonzero rather than crash if a wrong parameter is passed (LP: #637020). --- debian/changelog | 4 +++- ubuntu-iso | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0bef632..772920f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,8 @@ ubuntu-dev-tools (0.108) UNRELEASED; urgency=low * pull-lp-source: Unquote URI to get "+" instead of "%2B" in the file name (LP: #681114). * sponsor-patch: Allow updating the build environment if the build failed. + * ubuntu-iso: Exit nonzero rather than crash if a wrong parameter is passed + (LP: #637020). [ Colin Watson ] * grep-merges: New tool. @@ -24,7 +26,7 @@ ubuntu-dev-tools (0.108) UNRELEASED; urgency=low --buildresult is specified. * sponsor-patch: Support building with pbuilder-dist. - -- Benjamin Drung Fri, 17 Dec 2010 22:47:30 +0100 + -- Benjamin Drung Sat, 18 Dec 2010 12:57:29 +0100 ubuntu-dev-tools (0.107) experimental; urgency=low diff --git a/ubuntu-iso b/ubuntu-iso index 339903a..a9ea792 100755 --- a/ubuntu-iso +++ b/ubuntu-iso @@ -30,7 +30,8 @@ def extract(iso, path): stdout, stderr = pipe.communicate() if pipe.returncode != 0: - raise Exception, stderr + sys.stderr.write(stderr) + sys.exit(pipe.returncode) return stdout