def consume_config(self, config, path_to_config):
        """Invoked after 'consume_options' is called to set the Configuration object to be used.

        @param config: The configuration object to use.  It will be None if the configuration could not be parsed.
        @param path_to_config: The full path to file that was read to create the config object.

        @type config: configuration.Configuration
        @type path_to_config: str
        """
        # Now that we have the config and have consumed any options that we could have been specified, we need to
        # determine where we read the pidfile from.  Typically, this should be based on the configuration file, but
        # in the case where we cannot read it, we have to guess or use the commandline option.
        if config is not None:
            self.__pidfile = os.path.join(config.agent_log_path, 'agent.pid')
            self.__verify_command_in_pidfile = config.pidfile_advanced_reuse_guard

        elif self.__pidfile_from_options is None:
            self.__pidfile = os.path.join(self.default_paths.agent_log_path, 'agent.pid')
            print >> sys.stderr, 'Assuming pid file is \'%s\'.  Use --pid-file to override.' % self.__pidfile
        else:
            self.__pidfile = os.path.abspath(self.__pidfile_from_options)
            print >> sys.stderr, 'Using pid file \'%s\'.' % self.__pidfile
dataset/ETHPy150Open scalyr/scalyr-agent-2/scalyr_agent/platform_posix.py/PosixPlatformController.consume_config/original