From a1d9d9d885ad88285833c8b645973b9987821996 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 7 Dec 2023 18:19:28 +0100 Subject: [PATCH] switch to loading mirrors.yml with ruamel to get YAML 1.2 support --- fdroidserver/index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fdroidserver/index.py b/fdroidserver/index.py index 509790bb..9a631eb8 100644 --- a/fdroidserver/index.py +++ b/fdroidserver/index.py @@ -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(