From 5251ce1484272c48247551148a59dbd6bb13f6f1 Mon Sep 17 00:00:00 2001 From: Lukas Prokop Date: Tue, 11 Sep 2012 14:16:48 +0200 Subject: [PATCH] Fix error message. Replace | root@grml ~ # grml2usb --fat16 /live/image /dev/sdb1 --bootoptions="ssh=secret" --grub | Executing grml2usb version 0.13.0 | Are you sure you want to format the specified partition with fat16? y/N y | Note: you can skip this question using the option --force | Formating partition with fat16 filesystem | mkfs.vfat 3.0.13 (30 Jun 2012) | Using /live/image as install base | Error: could not find grml-version file. | Traceback (most recent call last): | File "/usr/sbin/grml2usb", line 1738, in | main() | File "/usr/sbin/grml2usb", line 1715, in main | install(iso, device) | File "/usr/sbin/grml2usb", line 1444, in install | install_grml(iso_mountpoint, device) | File "/usr/sbin/grml2usb", line 1478, in install_grml | grml_flavours = identify_grml_flavour(mountpoint) | File "/usr/sbin/grml2usb", line 1112, in identify_grml_flavour | raise | TypeError: exceptions must be old-style classes or derived from | BaseException, not NoneType | 1 root@grml ~ # with | root@grml ~ # grml2usb --fat16 /live/image /dev/sdb1 --bootoptions="ssh=secret" --grub | Executing grml2usb version 0.13.0 | Are you sure you want to format the specified partition with fat16? y/N y | Note: you can skip this question using the option --force | Formating partition with fat16 filesystem | mkfs.vfat 3.0.13 (30 Jun 2012) | Using /live/image as install base | Error: could not find grml-version file. | Cleaning up before exiting... | 1 root@grml ~ # --- grml2usb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/grml2usb b/grml2usb index 76562dd..63c26b3 100755 --- a/grml2usb +++ b/grml2usb @@ -1109,7 +1109,8 @@ def identify_grml_flavour(mountpath): if not version_files: logging.critical("Error: could not find grml-version file.") - raise + cleanup() + sys.exit(1) flavours = [] logging.debug("version_files = %s", version_files) -- 2.1.4