mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-13 18:50:29 +03:00
switch to loading mirrors.yml with ruamel to get YAML 1.2 support
This commit is contained in:
parent
96fc49d7fc
commit
a1d9d9d885
1 changed files with 2 additions and 2 deletions
|
|
@ -26,10 +26,10 @@ import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import ruamel.yaml
|
||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
import yaml
|
|
||||||
import zipfile
|
import zipfile
|
||||||
import calendar
|
import calendar
|
||||||
import qrcode
|
import qrcode
|
||||||
|
|
@ -1409,7 +1409,7 @@ def add_mirrors_to_repodict(repo_section, repodict):
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
with mirrors_yml.open() as fp:
|
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):
|
if not isinstance(mirrors_config, list):
|
||||||
msg = _('{path} is not list, but a {datatype}!')
|
msg = _('{path} is not list, but a {datatype}!')
|
||||||
raise TypeError(
|
raise TypeError(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue