d.setBackgroundTitle('snf-image-creator')
gauge = GaugeOutput(d, "Initialization", "Initializing...")
out.add(gauge)
d.setBackgroundTitle('snf-image-creator')
gauge = GaugeOutput(d, "Initialization", "Initializing...")
out.add(gauge)
while 1:
if media is not None:
if not os.path.exists(media):
d.msgbox("The file `%s' you choose does not exist." % media,
width=SMALL_WIDTH)
else:
while 1:
if media is not None:
if not os.path.exists(media):
d.msgbox("The file `%s' you choose does not exist." % media,
width=SMALL_WIDTH)
else:
- (code, media) = d.fselect(root, 10, 60, extra_button=1,
+ (code, media) = d.fselect(default, 10, 60, extra_button=1,
if code in (d.DIALOG_CANCEL, d.DIALOG_ESC):
if confirm_exit(d, "You canceled the media selection dialog box."):
sys.exit(0)
if code in (d.DIALOG_CANCEL, d.DIALOG_ESC):
if confirm_exit(d, "You canceled the media selection dialog box."):
sys.exit(0)
parser.add_option("-l", "--logfile", type="string", dest="logfile",
default=None, help="log all messages to FILE",
metavar="FILE")
parser.add_option("-l", "--logfile", type="string", dest="logfile",
default=None, help="log all messages to FILE",
metavar="FILE")
+ parser.add_option("--tmpdir", type="string", dest="tmp", default=None,
+ help="create large temporary image files under DIR",
+ metavar="DIR")
- media = select_file(d, args[0] if len(args) == 1 else None)
+ if options.tmp is not None and not os.path.isdir(options.tmp):
+ raise FatalError("The directory `%s' specified with --tmpdir is "
+ "not valid" % options.tmp)
raise FatalError(
"Unable to open logfile `%s' for writing. Reason: %s" %
(options.logfile, e.strerror))
raise FatalError(
"Unable to open logfile `%s' for writing. Reason: %s" %
(options.logfile, e.strerror))
out = CompositeOutput([log])
out.output("Starting %s v%s..." %
(parser.get_prog_name(), version))
out = CompositeOutput([log])
out.output("Starting %s v%s..." %
(parser.get_prog_name(), version))