Revision 678b382b image_creator/dialog_menu.py

b/image_creator/dialog_menu.py
648 648

  
649 649
    for i in range(len(fields)):
650 650
        param = needed[names[i]]
651
        if param.validator(output[i]):
652
            image.os.sysprep_params[names[i]] = output[i]
653
        else:
654
            d.msgbox("The value you provided for parameter: %s is not valid" %
655
                     names[i], width=SMALL_WIDTH)
656
            return False
651
        try:
652
            value = param.type(output[i])
653
            if param.validate(value):
654
                image.os.sysprep_params[names[i]] = value
655
                continue
656
        except ValueError:
657
            pass
658

  
659
        d.msgbox("The value you provided for parameter: `%s' is not valid" %
660
                 names[i], width=SMALL_WIDTH)
661
        return False
657 662

  
658 663
    return True
659 664

  

Also available in: Unified diff