from optparse import OptionParser
from inspect import isroutine, isclass
import datetime
from optparse import OptionParser
from inspect import isroutine, isclass
import datetime
logging.debug('RuntimeError while umount %s, ignoring' % device)
for tmppath in TMPFILES.copy():
logging.debug('RuntimeError while umount %s, ignoring' % device)
for tmppath in TMPFILES.copy():
msg = 'RuntimeError while removing temporary %s, ignoring'
logging.debug(msg % tmppath)
msg = 'RuntimeError while removing temporary %s, ignoring'
logging.debug(msg % tmppath)
# update the existing flavours on the target
for line in fileinput.input([target_grml_version_file], inplace=1):
flavour = get_flavour(line)
# update the existing flavours on the target
for line in fileinput.input([target_grml_version_file], inplace=1):
flavour = get_flavour(line)
logging.debug('Unmounted %s' % efi_mountpoint)
os.rmdir(efi_mountpoint)
logging.debug('Removed directory %s' % efi_mountpoint)
logging.debug('Unmounted %s' % efi_mountpoint)
os.rmdir(efi_mountpoint)
logging.debug('Removed directory %s' % efi_mountpoint)
if options.force or os.path.exists(os.path.join(image, 'live')):
logging.info("Using %s as install base", image)
else:
if options.force or os.path.exists(os.path.join(image, 'live')):
logging.info("Using %s as install base", image)
else:
"Do you really want to use this image? y/N " % image)
if q.lower() == 'y':
logging.info("Using %s as install base", image)
"Do you really want to use this image? y/N " % image)
if q.lower() == 'y':
logging.info("Using %s as install base", image)
print("Forcing mkfs.fat16 on %s as requested via option --force." % device)
else:
# make sure the user is aware of what he is doing
print("Forcing mkfs.fat16 on %s as requested via option --force." % device)
else:
# make sure the user is aware of what he is doing
if not os.path.isdir(device) and not check_for_usbdevice(device) and not options.force:
print("Warning: the specified device %s does not look like a removable usb device." % device)
if not os.path.isdir(device) and not check_for_usbdevice(device) and not options.force:
print("Warning: the specified device %s does not look like a removable usb device." % device)
print("Instead of using grml2usb /path/to/iso %s you might" % device)
print("want to use grml2usb /path/to/iso /dev/... instead.")
print("Please check out the grml2usb manpage for details.")
print("Instead of using grml2usb /path/to/iso %s you might" % device)
print("want to use grml2usb /path/to/iso /dev/... instead.")
print("Please check out the grml2usb manpage for details.")
except Exception as error:
logging.critical("Fatal: %s", str(error))
except Exception as error:
logging.critical("Fatal: %s", str(error))