desktop_lockdown: sets values in the org.gnome.desktop.lockdown schema

def desktop_lockdown(name,
                     user=None,
                     disable_application_handlers=None,
                     disable_command_line=None,
                     disable_lock_screen=None,
                     disable_log_out=None,
                     disable_print_setup=None,
                     disable_printing=None,
                     disable_save_to_disk=None,
                     disable_user_switching=None,
                     user_administration_disabled=None,
                     **kwargs):
    '''
    desktop_lockdown: sets values in the org.gnome.desktop.lockdown schema
    '''
    gnome_kwargs = {
        'user': user,
        'schema': 'org.gnome.desktop.lockdown'
    }

    preferences = ['disable_application_handlers', 'disable_command_line',
            'disable_lock_screen', 'disable_log_out', 'disable_print_setup',
            'disable_printing', 'disable_save_to_disk',
            'disable_user_switching', 'user_administration_disabled']

    preferences_hash = {}
    for pref in preferences:
        if pref in locals() and locals()[pref] is not None:
            key = re.sub('_', '-', pref)
            preferences_hash[key] = locals()[pref]

    return _do(name, gnome_kwargs, preferences_hash)