correct yaml-rewriting for buildozer flag

This commit is contained in:
Michael Pöhn 2017-07-04 13:27:45 +02:00
parent 0980fb4df8
commit 1b362c2183

View file

@ -837,7 +837,7 @@ def post_metadata_parse(app):
elif v == [False]: elif v == [False]:
return ['no'] return ['no']
_bool_allowed = ('disable', 'kivy', 'maven') _bool_allowed = ('disable', 'kivy', 'maven', 'buildozer')
builds = [] builds = []
if 'builds' in app: if 'builds' in app:
@ -1063,7 +1063,7 @@ def write_yaml(mf, app):
value = getattr(build, field) value = getattr(build, field)
if field == 'gradle' and value == ['off']: if field == 'gradle' and value == ['off']:
value = [ruamel.yaml.scalarstring.SingleQuotedScalarString('off')] value = [ruamel.yaml.scalarstring.SingleQuotedScalarString('off')]
if field in ('disable', 'kivy', 'maven'): if field in ('disable', 'kivy', 'maven', 'buildozer'):
if value == 'no': if value == 'no':
continue continue
elif value == 'yes': elif value == 'yes':