def yaml_load(value): if yaml is None: raise RuntimeError("Yaml not available") return yaml.load(value, Loader=SafeLoader)