def test_pickling(self): manager = LoggingManager(log_config=get_log_config(), log_stdout=True) manager.extract_replacements(FakeTraj()) manager.check_log_config() manager.make_logging_handlers_and_tools() dump = pickle.dumps(manager) new_manager = pickle.loads(dump) manager.finalize()
def handle_config_file(config_file): """Searches for the $temp wildcard in a given config file and replaces it.""" parser = cp.ConfigParser() parser.read(config_file) sections = parser.sections() for section in sections: options = parser.options(section) for option in options: arg = parser.get(section, option, raw=True) if '$temp' in arg: LoggingManager._check_and_replace_parser_args(parser, section, option, rename_func=_rename_filename, make_dirs=False) return parser
def handle_config_file(config_file): """Searches for the $temp wildcard in a given config file and replaces it.""" parser = cp.ConfigParser() parser.read(config_file) sections = parser.sections() for section in sections: options = parser.options(section) for option in options: arg = parser.get(section, option, raw=True) if '$temp' in arg: LoggingManager._check_and_replace_parser_args( parser, section, option, rename_func=_rename_filename, make_dirs=False) return parser