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

« back to all changes in this revision

Viewing changes to setup/configure.py

setup.configure: Fixed bug if usrmgt_magic is None. Does not write comment if
    this is the case.

Show diffs side-by-side

added added

removed removed

Lines of Context:
281
281
 
282
282
    # Store comments in the conf object
283
283
    for opt in config_options:
 
284
        # Omitted if the key doesn't exist
284
285
        conf.set_by_path(opt.option_name, comment=opt.comment)
285
286
 
286
287
    # Set up some variables
364
365
        return 1
365
366
 
366
367
    # By default we generate the magic randomly.
367
 
    if conf['usrmgt']['magic'] is None:
 
368
    try:
 
369
        conf['usrmgt']['magic']     # Throw away; just check for KeyError
 
370
    except KeyError:
368
371
        conf['usrmgt']['magic'] = hashlib.md5(uuid.uuid4().bytes).hexdigest()
369
372
 
370
373
    # Generate the forum secret