Shame on me. Already pushed to master. Thanks Josef for spotting this.
Kamil
commit a09a4276ddbef08ff21067efc4d95a33da634410 Author: Kamil Páral kparal@redhat.com Date: Fri Jan 7 12:23:31 2011 +0100
bugfix: getbool() crashes for empty string
Revert to expected behavior where False is returned for empty string input.
diff --git a/lib/python/config.py b/lib/python/config.py index c9a59ad..1d7bc73 100644 --- a/lib/python/config.py +++ b/lib/python/config.py @@ -89,14 +89,14 @@ def getbool(value): Uses default bool conversion for non-string values. ''' boolean_states = {'1': True, 'yes': True, 'true': True, 'on': True, - '0': False, 'no': False, 'false': False, 'off': False} + '0': False, 'no': False, 'false': False, 'off': False, '': False}
if not isinstance(value, str): return bool(value)
value = value.lower() if value not in boolean_states: - raise ValueError, 'Not a boolean: %s' % value + raise ValueError, 'Not a boolean: %r %s' % (value, type(value))
return boolean_states[value]
commit ae43a319b7154904194a05ddbf0c72671fa1204f Author: Kamil Páral kparal@redhat.com Date: Fri Jan 7 12:39:47 2011 +0100
repoinfo.conf: set 'composes = no' as default for correct retyping
ConfigParser.getboolean() can't handle 'composes = (empty)'.
diff --git a/repoinfo.conf b/repoinfo.conf index 6f5c279..97dceca 100644 --- a/repoinfo.conf +++ b/repoinfo.conf @@ -4,7 +4,7 @@ parents = # list of supported architectures arches = i386, x86_64 # whether installation composes are created for this repo or not -composes = +composes = no # tag defaults to dist-[section_name] tag = dist-%(__name__)s baseurl = http://download.fedoraproject.org/pub/fedora/linux
autoqa-devel@lists.fedorahosted.org