1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-06-02 22:00:12 +02:00

switch to loading mirrors.yml with ruamel to get YAML 1.2 support

This commit is contained in:
Hans-Christoph Steiner 2023-12-07 18:19:28 +01:00
parent 96fc49d7fc
commit a1d9d9d885

View File

@ -26,10 +26,10 @@ import json
import logging
import os
import re
import ruamel.yaml
import shutil
import tempfile
import urllib.parse
import yaml
import zipfile
import calendar
import qrcode
@ -1409,7 +1409,7 @@ def add_mirrors_to_repodict(repo_section, repodict):
)
)
with mirrors_yml.open() as fp:
mirrors_config = yaml.safe_load(fp)
mirrors_config = ruamel.yaml.YAML(typ='safe').load(fp)
if not isinstance(mirrors_config, list):
msg = _('{path} is not list, but a {datatype}!')
raise TypeError(