From f30587718a79755c3b59d9a0b680dd7f971cfdcd Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Sat, 24 Nov 2012 08:54:20 -0500 Subject: Fix ListOpt to trim whitespace - throw in an extra strip() in the list parsing code - add a test case to verify that it works! Fixes LP #1079299 Change-Id: I4f0864c72ecd2569d0461c301acda395c87a93e0 --- openstack/common/cfg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openstack') diff --git a/openstack/common/cfg.py b/openstack/common/cfg.py index e967c61..c8a15d7 100644 --- a/openstack/common/cfg.py +++ b/openstack/common/cfg.py @@ -745,7 +745,7 @@ class ListOpt(Opt): """ def __call__(self, parser, namespace, values, option_string=None): if values is not None: - values = values.split(',') + values = [a.strip() for a in values.split(',')] setattr(namespace, self.dest, values) def _get_from_config_parser(self, cparser, section): -- cgit