never interpret "disable" as bool in yaml metadata

This commit is contained in:
Michael Pöhn 2018-08-02 17:31:58 +02:00
parent 545872f184
commit 1e7d9b854d
2 changed files with 6 additions and 3 deletions

3
.gitignore vendored
View File

@ -16,6 +16,9 @@ pylint.parseable
/.testfiles/
README.rst
# editor tmp files
.*.swp
# files generated by tests
tmp/
/tests/repo/icons*

View File

@ -249,7 +249,7 @@ class Build(dict):
def __init__(self, copydict=None):
super().__init__()
self.disable = False
self.disable = ''
self.commit = None
self.timeout = None
self.subdir = None
@ -874,7 +874,7 @@ def post_metadata_parse(app):
elif v == [False]:
return ['no']
_bool_allowed = ('disable', 'maven', 'buildozer')
_bool_allowed = ('maven', 'buildozer')
builds = []
if 'builds' in app:
@ -1118,7 +1118,7 @@ def write_yaml(mf, app):
value = getattr(build, field)
if field == 'gradle' and value == ['off']:
value = [ruamel.yaml.scalarstring.SingleQuotedScalarString('off')]
if field in ('disable', 'maven', 'buildozer'):
if field in ('maven', 'buildozer'):
if value == 'no':
continue
elif value == 'yes':