Revision 84bc469c

b/image_creator/dialog_menu.py
554 554
                try:
555 555
                    image.mount(readonly=False)
556 556
                    try:
557
                        err_msg = \
558
                            "Unable to execute the system preparation tasks."
559
                        if not image.mounted:
560
                            d.msgbox("%s Couldn't mount the media." % err_msg,
561
                                title="System Preperation", width=SMALL_WIDTH)
562
                            return
563
                        elif image.mounted_ro:
564
                            d.msgbox("%s Couldn't mount the media read-write."
565
                                % err_msg, title="System Preperation",
566
                                width=SMALL_WIDTH)
567
                            return
568

  
557 569
                        # The checksum is invalid. We have mounted the image rw
558 570
                        if 'checksum' in session:
559 571
                            del session['checksum']
b/image_creator/dialog_wizard.py
265 265

  
266 266
        #Sysprep
267 267
        image.mount(False)
268
        err_msg = "Unable to execute the system preparation tasks."
269
        if not image.mounted:
270
            raise FatalError("%s Couldn't mount the media." % err_msg)
271
        elif image.mounted_ro:
272
            raise FatalError("%s Couldn't mount the media read-write."
273
                             % err_msg)
268 274
        image.os.do_sysprep()
269 275
        metadata = image.os.meta
270 276
        image.umount()
b/image_creator/main.py
224 224
                return 0
225 225

  
226 226
            if options.sysprep:
227
                err_msg = "Unable to apply the system preparation tasks."
228
                if not image.mounted:
229
                    raise FatalError("%s Couldn't mount the media." % err_msg)
230
                elif image.mounted_ro:
231
                    raise FatalError("%s Couldn't mount the media read-write."
232
                                     % err_msg)
227 233
                image.os.do_sysprep()
228 234

  
229 235
            metadata = image.os.meta

Also available in: Unified diff