def __init__(self, job, harness_args): """ job The job object for this job """ super(harness_autoserv, self).__init__(job) self.status = os.fdopen(3, 'w', 0) # If a bug on the client run code prevents global_config.ini # from being copied to the client machine, the client will run # without a global config, relying only on the defaults of the # config items. To avoid that happening silently, the check below # was written. try: settings.get_section_values(["CLIENT", "COMMON"]) except ConfigParser.NoSectionError: logging.error("Empty CLIENT or COMMON configuration session. " "global_config.ini missing. This probably means " "a bug on the server code. Please verify.")
def _create_client_config_file(self, client_log_prefix=None): """ Create a temporary file with the [CLIENT] and [COMMON] section configuration values taken from the server global_config.ini. @param client_log_prefix: Optional prefix to prepend to log files. :return: Path of the temporary file generated. """ config = settings.get_section_values(('CLIENT', 'COMMON')) if client_log_prefix: config.set('CLIENT', 'default_logging_name', client_log_prefix) return self._create_aux_file(config.write)
def _create_client_config_file(self, client_log_prefix=None): """ Create a temporary file with the [CLIENT] and [COMMON] section configuration values taken from the server global_config.ini. :param client_log_prefix: Optional prefix to prepend to log files. :return: Path of the temporary file generated. """ config = settings.get_section_values(('CLIENT', 'COMMON')) if client_log_prefix: config.set('CLIENT', 'default_logging_name', client_log_prefix) return self._create_aux_file(config.write)