Close down a specific config used by a specified application (that is not also still in use by other applications)
514066
private void shutdown(String applicationName, ClassLoader classLoader) {
        synchronized (configCache) {
            ConfigWrapper configWrapper = configCache.get(classLoader);
            boolean close = configWrapper.removeApplication(applicationName);
            if (close) {
                close(classLoader);
            }
        }
    }
1102888
def remove_config_lock(name):
    '''
    

    '''
    ret = _default_ret(name)

    ret.update({
        'changes': __salt__['panos.remove_config_lock'](),
        'result': True
    })

    return ret
454926
def remove(config, username, filename, force):
        """"""
        client = Client()
        client.prepare_connection()
        user_api = UserApi(client)
        key_api = API(client)
        key_api.remove(username, user_api, filename, force)
1129993
def _remove_setting(section, name, configfile, save=False):
    '''
    '''
    removed = False
    config = _load_config(configfile)
    if section in config:
        if name.lower() in config[section]:
            removed = config.remove_option(section, name)

    # Does the user want to save the file?
    if removed and save:
        write_config(configfile, config)

    return removed
1214834
def remove_setting(self, section, name, save=False):
    '''
    '''
    configfile = get_configfile()
    return _remove_setting(section, name, configfile, save)
1322204
def _warn_on_old_config(self):
        """"""
        # Is an old setion is in the config file ?
        old_sections = ['Allowed Applications', 'Ignored Applications']
        for old_section in old_sections:
            if self._parser.has_section(old_section):
                error("Old config file detected. Aborting.\n"
                      "\n"
                      "An old section (e.g. [Allowed Applications]"
                      " or [Ignored Applications] has been detected"
                      " in your {} file.\n"
                      "I'd rather do nothing than do something you"
                      " do not want me to do.\n"
                      "\n"
                      "Please read the up to date documentation on"
                      " <https://github.com/lra/mackup> and migrate"
                      " your configuration file."
                      .format(MACKUP_CONFIG_FILE))
1003520
def prune(force):
    """"""
    if not force:
        echo_warning(
            'Removing configuration of environments that may be in use will leave '
            'them in a potentially unusable state. If you wish to proceed (e.g. you '
            'have just restarted your machine), you may use the -f / --force flag.'
        )
        abort(code=2)

    checks = get_configured_checks()
    for check in checks:
        envs = get_configured_envs(check)

        if envs:
            echo_info('{}:'.format(check))
            for env in envs:
                echo_waiting('Removing `{}`... '.format(env), nl=False, indent=True)
                remove_env_data(check, env)
                echo_success('success!')

        remove_env_root(check)
830015
def tear_down(self):
        

        if not self.browser_config.get('terminate'):
            self.warning_log("Skipping terminate")
            return

        self.info_log("Tearing down")

        if self.browser_config.get('platform').lower() == 'linux':
            self.execute_command("shutdown -h now", username='root')

        elif self.browser_config.get('platform').lower() == 'windows':
            self.session.console.power_down()
256820
def purge_configs():
    
    user_config = path(CONFIG_FILE_NAME, root=USER)
    inplace_config = path(CONFIG_FILE_NAME)

    if os.path.isfile(user_config):
        os.remove(user_config)

    if os.path.isfile(inplace_config):
        os.remove(inplace_config)
895257
protected void unsetConfigAdmin(ServiceReference<ConfigurationAdmin> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "unsetConfigAdmin", ref);
        configAdminRef.unsetReference(ref);
    }
252655
def _cleanup(self):
        """"""
        self._expkg = None
        self._extmp = None
        self._flag_e = True
        self._ifile.close()
868971
def unset_config_value(self, name, quiet=False):
        

        config_data = self._read_config_file()

        if name in config_data:

            del config_data[name]

            self._write_config_file(config_data)

            if not quiet:
                self.print_config_value(name, separator=' is now set to: ')
329232
def remove(self, level, logger):
        
        self.config[level].discard(logger)
        logger.close()
519443
public static function removeConfig(string $name): void
    {
        if ($name == 'application') {
            throw new ApplicationException('You\'re not allowed to remove \'application\' config in runtime');
        }

        if (isset(static::$configs[$name])) {
            unset(static::$configs[$name]);
        }
    }
460754
def _clear_config(self):
        # type: () -> None
        """"""
        for section in self._config.sections():
            self._config.remove_section(section)
843280
def cleanup(self):
        """"""
        try:
            self.exit_config_mode()
        except Exception:
            # Always try to send 'exit' regardless of whether exit_config_mode works or not.
            pass
        self._session_log_fin = True
        self.write_channel("exit" + self.RETURN)
335807
private void stopApplication(File currentFile) {
        if (_tc.isEventEnabled()) {
            Tr.event(_tc, "Stopping dropin application '" + currentFile.getName() + "'");
        }
        String filePath = getAppLocation(currentFile);

        try {
            Configuration config = _configs.remove(filePath);
            if (config != null) {
                config.delete();
            }
        } catch (Exception e) {
            getAppMessageHelper(null, filePath).error("MONITOR_APP_STOP_FAIL", currentFile.getName());
        }
    }