mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
Merge branch 'faster_yaml' into 'master'
metadata: use yaml C implementation when available Closes #716 See merge request fdroid/fdroidserver!696
This commit is contained in:
commit
e9830fc4ab
1 changed files with 5 additions and 1 deletions
|
@ -27,6 +27,10 @@ import logging
|
||||||
import textwrap
|
import textwrap
|
||||||
import io
|
import io
|
||||||
import yaml
|
import yaml
|
||||||
|
try:
|
||||||
|
from yaml import CSafeLoader as SafeLoader
|
||||||
|
except ImportError:
|
||||||
|
from yaml import SafeLoader
|
||||||
import importlib
|
import importlib
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
|
@ -1036,7 +1040,7 @@ def parse_json_metadata(mf, app):
|
||||||
|
|
||||||
|
|
||||||
def parse_yaml_metadata(mf, app):
|
def parse_yaml_metadata(mf, app):
|
||||||
yamldata = yaml.safe_load(mf)
|
yamldata = yaml.load(mf, Loader=SafeLoader)
|
||||||
|
|
||||||
deprecated_in_yaml = ['Provides']
|
deprecated_in_yaml = ['Provides']
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue