Switch order of usb <-> path check
authorMichael Prokop <mika@grml.org>
Sun, 7 Jun 2009 22:50:04 +0000 (00:50 +0200)
committerMichael Prokop <mika@grml.org>
Sun, 7 Jun 2009 22:50:04 +0000 (00:50 +0200)
debian/changelog
grml2usb

index 86bfe52..437c5dc 100644 (file)
@@ -19,8 +19,11 @@ grml2usb (0.9.8) UNRELEASED; urgency=low
   * All these “set root=” are not needed for GRUB2 (thanks, Thorsten)
   * Add grml2iso for creating a bootable DVD (thanks again for help
     and patches, Thorsten).
+  * Switch order of check whether the specified device is a directory
+    and check for usb device (as the usb device check will fail if
+    it's a directory).
 
- -- Michael Prokop <mika@grml.org>  Sun, 07 Jun 2009 23:09:26 +0200
+ -- Michael Prokop <mika@grml.org>  Mon, 08 Jun 2009 00:48:17 +0200
 
 grml2usb (0.9.7) unstable; urgency=low
 
index 42362d6..7cc07c3 100755 (executable)
--- a/grml2usb
+++ b/grml2usb
@@ -1630,7 +1630,7 @@ def handle_vfat(device):
             logging.critical("Execution failed: %s", error)
             sys.exit(1)
 
-    if not check_for_usbdevice(device) and not os.path.isdir(device):
+    if not os.path.isdir(device) and not check_for_usbdevice(device):
         print "Warning: the specified device %s does not look like a removable usb device." % device
         f = raw_input("Do you really want to continue? y/N ")
         if f == "y" or f == "Y":