(self, config)
| 314 | return merged_dict |
| 315 | |
| 316 | def _read_preload_script_conf(self, config): |
| 317 | if config is None: |
| 318 | return None |
| 319 | |
| 320 | error_message = 'Failed to load preload script for ' + self.name + ': ' |
| 321 | |
| 322 | if not isinstance(config, dict): |
| 323 | logging.warning(error_message + 'should be dict') |
| 324 | return None |
| 325 | |
| 326 | script = config.get('script') |
| 327 | if is_empty(script): |
| 328 | logging.warning(error_message + 'missing "script" field') |
| 329 | return |
| 330 | |
| 331 | try: |
| 332 | format = read_output_format(config) |
| 333 | except InvalidConfigException: |
| 334 | LOGGER.warning(error_message + 'invalid format specified') |
| 335 | format = OUTPUT_FORMAT_TERMINAL |
| 336 | |
| 337 | return {'script': script, 'output_format': format} |
| 338 | |
| 339 | def run_preload_script(self): |
| 340 | if not self.preload_script: |
no test coverage detected