'save the environment parameters in config file'

def save_config(self):

    for k in SAVED_ATTR:
        try:
            setattr(self.session, ('set_cm_%s' % k), getattr(self.settings, k))
        except OperationNotPossibleAtRuntimeException:
            self._logger.debug('Cannot    set    attribute    %s.    Not    permitted    in    runtime', k)
    archive_sources = []
    lboosting_sources = []
    flag_enabled_sources = []
    flag_disabled_sources = []
    for (boosting_source_name, boosting_source) in self.boosting_sources.iteritems():
        bsname = source_to_string(boosting_source_name)
        lboosting_sources.append(bsname)
        if boosting_source.enabled:
            flag_enabled_sources.append(bsname)
        else:
            flag_disabled_sources.append(bsname)
        if boosting_source.archive:
            archive_sources.append(bsname)
    self.session.config.set_credit_mining_sources(lboosting_sources, CONFIG_KEY_SOURCELIST)
    self.session.config.set_credit_mining_sources(flag_enabled_sources, CONFIG_KEY_ENABLEDLIST)
    self.session.config.set_credit_mining_sources(flag_disabled_sources, CONFIG_KEY_DISABLEDLIST)
    self.session.config.set_credit_mining_sources(archive_sources, CONFIG_KEY_ARCHIVELIST)
    self.session.config.write()
