mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
Merge branch 'fix_stretch_ruamel' into 'master'
Support ruamel from Debian stretch See merge request fdroid/fdroidserver!996
This commit is contained in:
commit
eb2fdc5a58
@ -982,9 +982,12 @@ def write_yaml(mf, app):
|
|||||||
return builds
|
return builds
|
||||||
|
|
||||||
yaml_app = _app_to_yaml(app)
|
yaml_app = _app_to_yaml(app)
|
||||||
|
try:
|
||||||
yaml = ruamel.yaml.YAML()
|
yaml = ruamel.yaml.YAML()
|
||||||
yaml.indent(mapping=4, sequence=4, offset=2)
|
yaml.indent(mapping=4, sequence=4, offset=2)
|
||||||
yaml.dump(yaml_app, stream=mf)
|
yaml.dump(yaml_app, stream=mf)
|
||||||
|
except AttributeError: # Debian/stretch's version does not have YAML()
|
||||||
|
ruamel.yaml.round_trip_dump(yaml_app, mf, indent=4, block_seq_indent=2)
|
||||||
|
|
||||||
|
|
||||||
build_line_sep = re.compile(r'(?<!\\),')
|
build_line_sep = re.compile(r'(?<!\\),')
|
||||||
|
Loading…
Reference in New Issue
Block a user