Show
Ignore:
Timestamp:
02/18/08 23:43:01 (16 years ago)
Author:
jerome
Message:

pkinvoice now works new style.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/commandline.py

    r3340 r3341  
    6262        loginvalidparam(opt, value, option.default, \ 
    6363                        _("Value must be positive")) 
     64        setattr(optionparser.values, option.dest, option.default) 
     65    else :     
     66        setattr(optionparser.values, option.dest, value) 
     67 
     68def checkandset_percent(option, opt, value, optionparser) :     
     69    """Checks if an option argument is comprised between 0.0 included and 100.0 not included, and validates the option if it is the case.""" 
     70    if not (0.0 <= value < 100.0) : 
     71        loginvalidparam(opt, value, option.default, \ 
     72                        _("Value must be comprised between 0.0 included and 100.0 not included")) 
    6473        setattr(optionparser.values, option.dest, option.default) 
    6574    else :