Updates reporting config once we've parsed cmd-line flags.
7767
def update_reporting(self, global_options, is_quiet, run_tracker):
    """"""

    # Get any output silently buffered in the old console reporter, and remove it.
    removed_reporter = run_tracker.report.remove_reporter('capturing')
    buffered_out = self._consume_stringio(removed_reporter.settings.outfile)
    buffered_err = self._consume_stringio(removed_reporter.settings.errfile)

    log_level = Report.log_level_from_string(global_options.level or 'info')
    # Ideally, we'd use terminfo or somesuch to discover whether a
    # terminal truly supports color, but most that don't set TERM=dumb.
    color = global_options.colors and (os.getenv('TERM') != 'dumb')
    timing = global_options.time
    cache_stats = global_options.time  # TODO: Separate flag for this?

    if is_quiet:
      console_reporter = QuietReporter(run_tracker,
                                       QuietReporter.Settings(log_level=log_level, color=color,
                                                              timing=timing, cache_stats=cache_stats))
    else:
      # Set up the new console reporter.
      stdout = sys.stdout.buffer if PY3 else sys.stdout
      stderr = sys.stderr.buffer if PY3 else sys.stderr
      settings = PlainTextReporter.Settings(log_level=log_level, outfile=stdout, errfile=stderr,
                                            color=color, indent=True, timing=timing, cache_stats=cache_stats,
                                            label_format=self.get_options().console_label_format,
                                            tool_output_format=self.get_options().console_tool_output_format)
      console_reporter = PlainTextReporter(run_tracker, settings)
      console_reporter.emit(buffered_out, dest=ReporterDestination.OUT)
      console_reporter.emit(buffered_err, dest=ReporterDestination.ERR)
      console_reporter.flush()
    run_tracker.report.add_reporter('console', console_reporter)

    if global_options.logdir:
      # Also write plaintext logs to a file. This is completely separate from the html reports.
      safe_mkdir(global_options.logdir)
      run_id = run_tracker.run_info.get_info('id')
      outfile = open(os.path.join(global_options.logdir, '{}.log'.format(run_id)), 'wb')
      errfile = open(os.path.join(global_options.logdir, '{}.err.log'.format(run_id)), 'wb')
      settings = PlainTextReporter.Settings(log_level=log_level, outfile=outfile, errfile=errfile,
                                            color=False, indent=True, timing=True, cache_stats=True,
                                            label_format=self.get_options().console_label_format,
                                            tool_output_format=self.get_options().console_tool_output_format)
      logfile_reporter = PlainTextReporter(run_tracker, settings)
      logfile_reporter.emit(buffered_out, dest=ReporterDestination.OUT)
      logfile_reporter.emit(buffered_err, dest=ReporterDestination.ERR)
      logfile_reporter.flush()
      run_tracker.report.add_reporter('logfile', logfile_reporter)

    invalidation_report = self._get_invalidation_report()
    if invalidation_report:
      run_id = run_tracker.run_info.get_info('id')
      outfile = os.path.join(self.get_options().reports_dir, run_id, 'invalidation-report.csv')
      invalidation_report.set_filename(outfile)

    return invalidation_report
966856
@Override
    public void updateConfigurations(String commit, Collection<String> paths) {
        Map<String, Configuration> configurationsMap = getConfigurationMap(commit, paths);
        paths.forEach(path -> notifyUpdated(configurationsMap
            .getOrDefault(path, new Configuration(path, null))));
    }
134318
static public void update(Configuration configs)
    {
        scoringPolicy = configs.get(MalmoMod.SCORING_CONFIGS, "policy", DEFAULT_NO_SCORING).getInt();
        if (scoringPolicy > 0) {
            String customLogHandler = configs.get(MalmoMod.SCORING_CONFIGS, "handler", "").getString();
            setLogging(Level.INFO, customLogHandler);
        }
        if (logging)
            log("<ScoreInit><Policy>" + scoringPolicy + "</Policy></ScoreInit>");
    }
612083
protected void adjustServerPrefix() {

        CmsSSLMode mode = (CmsSSLMode)m_encryption.getValue();
        if (simpleReturn(mode)) {
            return;
        }
        String toBeReplaced = "http:";
        String newString = "https:";

        if (mode.equals(CmsSSLMode.NO) | mode.equals(CmsSSLMode.SECURE_SERVER)) {
            toBeReplaced = "https:";
            newString = "http:";
        }

        if (((CmsSite)m_server.getValue()).getUrl().contains(toBeReplaced)) {

            String newURL = ((CmsSite)m_server.getValue()).getUrl().replaceAll(toBeReplaced, newString);
            CmsSite newSite = new CmsSite("dummy", newURL);
            if (!m_serverContainer.containsId(newSite)) {
                m_serverContainer.addItem(newSite);
            }
            m_server.select(newSite);
        }

    }
379031
def env_updated(cls, app, env):
        
        if cls.ABORT_AFTER_READ:
            config = {n: getattr(app.config, n) for n in (a for a in dir(app.config) if a.startswith('scv_'))}
            config['found_docs'] = tuple(str(d) for d in env.found_docs)
            config['master_doc'] = str(app.config.master_doc)
            cls.ABORT_AFTER_READ.put(config)
            sys.exit(0)
845802
def setCmdline(self,value=1):
        """"""
        # set through dictionary to avoid extra calls to __setattr__
        if value:
            self.__dict__['flags'] = self.flags | _cmdlineFlag
        else:
            self.__dict__['flags'] = self.flags & ~_cmdlineFlag
966947
def update_config_mode(self, prompt=None):
        """"""
        # TODO: Fix the conflict with config mode attribute at connection
        if prompt:
            self.mode = self.driver.update_config_mode(prompt)
        else:
            self.mode = self.driver.update_config_mode(self.prompt)
1316732
public function updatePhpQaConfig($toolName, $toolClass, $toolReport = null)
    {
        $configPath = getcwd().'/.phpqa.yml';
        $config = [];

        if (file_exists($configPath)) {
            $config = Yaml::parse(file_get_contents($configPath));
        }

        // Add tools
        if (!array_key_exists('tool', $config)) {
            $config['tool'] = [];
        }
        $config['tool'][$toolName] = $toolClass;
        

        if (is_string($toolReport)) {
            // Add Report
            if (!array_key_exists('report', $config)) {
                $config['report'] = [];
            }
            $config['report'][$toolName] = RelPath::getRelativePath(realpath($toolReport), getcwd());
        }
        
        file_put_contents($configPath, Yaml::dump($config));
    }
1254473
def update_configuration(self):
        
        uri = "{}/configuration".format(self.data["uri"])
        result = self._helper.update({}, uri)
        self.refresh()

        return result
607857
protected function updateSettings()
    {
        $this->controlAccess('module_edit');
        $this->controlAccess('module_xss_edit');

        $this->module->setSettings('xss', $this->getSubmitted());
        $this->redirect('', $this->text('Settings have been updated'), 'success');
    }
668856
def _on_changed(self):
        """"""
        page = self._get_page()
        if not page.flag_autosave:
            page.flag_changed = True
            self._update_gui_text_tabs()
819062
def update(self):
        
        with open(os.path.join(self.config_dir, CONFIG_FILE_NAME), 'w') as config_file:
            self.config.write(config_file)
1317310
function updateXCConfigs(configItems, platformPath){
        xcconfigs.forEach(function(fileName){
            updateXCConfig(platformPath, fileName, configItems);
        });
    }
934533
def update_config(config_new, config_default):

    '''
    
    '''
    if any([isinstance(v, dict) for v in list(config_new.values())]):
        for k,v in list(config_new.items()):
            if isinstance(v,dict) and k in config_default:
                update_config(config_new[k],config_default[k])
            else:
                config_default[k] = v
    else:
        config_default.update(config_new)
    return config_default
583135
def update_parser(self, parser):
        

        self._parser = parser
        ini_str = argparse_to_ini(parser)
        configp = configparser.ConfigParser(allow_no_value=True)
        configp.read_dict(self._config)
        configp.read_string(ini_str)
        self._config.update(
            {s: dict(configp.items(s))
             for s in configp.sections()}
        )
1021488
def update_flags(self, idlist, flags):
        
        return self.update_bugs(idlist, self.build_update(flags=flags))
40230
protected void rewriteParseables() {

        if (m_parseables.isEmpty()) {
            return;
        }

        m_report.println(Messages.get().container(Messages.RPT_START_PARSE_LINKS_0), I_CmsReport.FORMAT_HEADLINE);

        int i = 0;
        Iterator<CmsResource> it = m_parseables.iterator();
        while (it.hasNext()) {
            CmsResource res = it.next();

            m_report.print(
                org.opencms.report.Messages.get().container(
                    org.opencms.report.Messages.RPT_SUCCESSION_2,
                    String.valueOf(i + 1),
                    String.valueOf(m_parseables.size())),
                I_CmsReport.FORMAT_NOTE);

            m_report.print(
                Messages.get().container(Messages.RPT_PARSE_LINKS_FOR_1, m_cms.getSitePath(res)),
                I_CmsReport.FORMAT_NOTE);
            m_report.print(org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_DOTS_0));

            try {
                // make sure the date last modified is kept...
                CmsFile file = m_cms.readFile(res);
                file.setDateLastModified(res.getDateLastModified());
                m_cms.writeFile(file);

                m_report.println(
                    org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_OK_0),
                    I_CmsReport.FORMAT_OK);
            } catch (Throwable e) {
                m_report.addWarning(e);
                m_report.println(
                    org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_FAILED_0),
                    I_CmsReport.FORMAT_ERROR);
                if (LOG.isWarnEnabled()) {
                    LOG.warn(Messages.get().getBundle().key(Messages.LOG_IMPORTEXPORT_REWRITING_1, res.getRootPath()));
                }
                if (LOG.isDebugEnabled()) {
                    LOG.debug(e.getLocalizedMessage(), e);
                }
            }
            i++;
        }

        m_report.println(Messages.get().container(Messages.RPT_END_PARSE_LINKS_0), I_CmsReport.FORMAT_HEADLINE);
    }