From: Michael Prokop Date: Mon, 4 May 2009 20:27:27 +0000 (+0200) Subject: Exit if installing grub fails X-Git-Tag: v0.9.5~5 X-Git-Url: https://git.grml.org/?p=grml2usb.git;a=commitdiff_plain;h=3d119415a53423cdc75f5ae9434bff713c0876be;ds=sidebyside Exit if installing grub fails --- diff --git a/grml2usb b/grml2usb index 2c28990..9709ad5 100755 --- a/grml2usb +++ b/grml2usb @@ -611,7 +611,10 @@ def install_grub(device): "--root-directory=%s" % device_mountpoint, device], stdout=file(os.devnull, "r+")) proc.wait() if proc.returncode != 0: - raise Exception("error executing grub-install") + # raise Exception("error executing grub-install") + logging.critical("Fatal: error executing grub-install (please check FAQ)" % error) + cleanup() + sys.exit(1) except CriticalException, error: logging.critical("Fatal: %s" % error) cleanup()