_get_config_list() was incorrectly returning [""] instead of [] for blank config lists

This commit is contained in:
Bob the Hamster 2013-02-06 14:17:44 -08:00
parent 91d2b10288
commit 6f1c779d04

View file

@ -762,7 +762,10 @@ class Buildozer(object):
def _get_config_list(self, section, token, default=None):
# monkey-patch method for ConfigParser
# get a key as a list of string, seperated from the comma
values = self.config.getdefault(section, token, '').split(',')
strvalue = self.config.getdefault(section, token, '')
if not strvalue:
return []
values = strvalue.split(',')
if not values:
return default
return [x.strip() for x in values]