mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 15:30:28 +03:00
standardize config on ruamel.yaml with a YAML 1.2 config
This is a key piece of the ongoing `PUBLISH` _config.yml_ migration. There was uneven implementation of which YAML parser to use, and that could lead to bugs where one parser might read a value one way, and a different parser will read the value a different way. I wanted to be sure that YAML 1.2 would always work. This makes all code that handles config files use the same `ruamel.yaml` parsers. This only touches other usages of YAML parsers when there is overlap. This does not port all of _fdroidserver_ to `ruamel.yaml` and YAML 1.2. The metadata files should already be YAML 1.2 anyway. # Conflicts: # fdroidserver/lint.py
This commit is contained in:
parent
53b62415d3
commit
2f47938dbf
15 changed files with 116 additions and 48 deletions
|
|
@ -13,7 +13,6 @@
|
|||
import json
|
||||
import os
|
||||
import pathlib
|
||||
import ruamel.yaml
|
||||
import shutil
|
||||
import sys
|
||||
import unittest
|
||||
|
|
@ -24,6 +23,7 @@ from fdroidserver import publish
|
|||
from fdroidserver import common
|
||||
from fdroidserver import metadata
|
||||
from fdroidserver import signatures
|
||||
from fdroidserver._yaml import yaml
|
||||
from fdroidserver.exception import FDroidException
|
||||
from .shared_test_code import mkdtemp, VerboseFalseOptions
|
||||
|
||||
|
|
@ -116,7 +116,6 @@ class PublishTest(unittest.TestCase):
|
|||
}
|
||||
self.assertEqual(expected, common.load_stats_fdroid_signing_key_fingerprints())
|
||||
|
||||
yaml = ruamel.yaml.YAML(typ='safe')
|
||||
with open(common.CONFIG_FILE) as fp:
|
||||
config = yaml.load(fp)
|
||||
self.assertEqual(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue