def _save_config(section, token, value):
    '''
    Helper function to persist a configuration in the ini file
    '''
    cmd = NIRTCFG_PATH
    cmd += ' --set section={0},token=\'{1}\',value=\'{2}\''.format(section, token, value)
    if __salt__['cmd.run_all'](cmd)['retcode'] != 0:
        exc_msg = 'Error: could not set {} to {} for {}\n'.format(token, value, section)
        raise salt.exceptions.CommandExecutionError(exc_msg)
def _save_config ( section , token , value ) : cmd = NIRTCFG_PATH cmd += ' --set section={0},token=\'{1}\',value=\'{2}\'' . format ( section , token , value ) if __salt__ [ 'cmd.run_all' ] ( cmd ) [ 'retcode' ] != 0 : exc_msg = 'Error: could not set {} to {} for {}\n' . format ( token , value , section ) raise salt . exceptions . CommandExecutionError ( exc_msg )
Helper function to persist a configuration in the ini file