~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to setup/configure.py

setup.configure: Fixed "None" as the default - now writes nothing rather than
    None to the config file (this was being interpreted as the string "None").
    Also changed comment to the effect that None was a permissible value.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
computed from prefix and the current Python version:""",
84
84
    """
85
85
# 'site-packages' directory in Python, where Python libraries are to be
86
 
# installed. May be None (recommended), in which case the value will be
 
86
# installed. May be omitted (recommended), in which case the value will be
87
87
# computed from prefix and the current Python version.""", ask=False))
88
88
 
89
89
config_options.append(ConfigOption("paths/data",
245
245
        try:
246
246
            conf.get_by_path(opt.option_name)
247
247
        except KeyError:
248
 
            conf.set_by_path(opt.option_name, opt.default)
 
248
            # If the default is None, omit it
 
249
            # Else ConfigObj will write the string 'None' to the conf file
 
250
            if opt.default is not None:
 
251
                conf.set_by_path(opt.option_name, opt.default)
249
252
 
250
253
    # Store comments in the conf object
251
254
    for opt in config_options: