Fix error message.
authorLukas Prokop <admin@lukas-prokop.at>
Tue, 11 Sep 2012 12:16:48 +0000 (14:16 +0200)
committerMichael Prokop <mika@grml.org>
Tue, 11 Sep 2012 14:58:48 +0000 (16:58 +0200)
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 <module>
|     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

index 76562dd..63c26b3 100755 (executable)
--- 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)