This commit is contained in:
2025-09-07 22:09:54 +02:00
parent e1b817252c
commit 2fc0d000b6
7796 changed files with 2159515 additions and 933 deletions

View File

@ -0,0 +1,17 @@
import yaml
from .loader import Loader, I18nFileLoadError
class YamlLoader(Loader):
"""class to load yaml files"""
def __init__(self):
super(YamlLoader, self).__init__()
def parse_file(self, file_content):
try:
if hasattr(yaml, "FullLoader"):
return yaml.load(file_content, Loader=yaml.FullLoader)
else:
return yaml.load(file_content)
except yaml.scanner.ScannerError as e:
raise I18nFileLoadError("invalid YAML: {0}".format(str(e)))