Project

General

Profile

« Previous | Next » 

Revision 1572

bin/map: n option: Defaults to 1 in test mode. Empty string "" is interpreted as None (previously n would have to be unset to specify None).

View differences:

map
58 58
    
59 59
    # Ranges
60 60
    start = util.cast(int, opts.get_env_var('start', '0', env_names))
61
    end = util.cast(int, opts.get_env_var('n', None, env_names))
61
    if test: end_default = 1
62
    else: end_default = None
63
    end = util.cast(int, util.none_if(
64
        opts.get_env_var('n', end_default, env_names), u''))
62 65
    if end != None: end += start
63 66
    
64 67
    # Debugging

Also available in: Unified diff