Only ask questions if options.force is not set. [Closes: issue833]
authorUlrich Dangel <uli@spamt.net>
Fri, 2 Apr 2010 12:26:38 +0000 (14:26 +0200)
committerUlrich Dangel <uli@spamt.net>
Fri, 2 Apr 2010 12:26:38 +0000 (14:26 +0200)
grml2usb

index 479f590..7e91839 100755 (executable)
--- a/grml2usb
+++ b/grml2usb
@@ -1858,7 +1858,7 @@ def handle_vfat(device):
             logging.critical("Execution failed: %s", error)
             sys.exit(1)
 
             logging.critical("Execution failed: %s", error)
             sys.exit(1)
 
-    if not os.path.isdir(device) and not check_for_usbdevice(device):
+    if not os.path.isdir(device) and not check_for_usbdevice(device) and not option.force:
         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":
         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":