diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2012-06-06 11:26:18 -0700 |
|---|---|---|
| committer | Vishvananda Ishaya <vishvananda@gmail.com> | 2012-06-06 13:27:49 -0700 |
| commit | 83044a72815ba2a7cec1e6a343c6eeb091c68a30 (patch) | |
| tree | 3f6e1e7fe508ac9714985f5f37fb5104792ffd80 /openstack/common | |
| parent | bdc4fb3183d455f00870981f5b9a200cc1b8b3f1 (diff) | |
| download | oslo-83044a72815ba2a7cec1e6a343c6eeb091c68a30.tar.gz oslo-83044a72815ba2a7cec1e6a343c6eeb091c68a30.tar.xz oslo-83044a72815ba2a7cec1e6a343c6eeb091c68a30.zip | |
Adds support for bol and eol spaces to ini files
* Fixes bug 1009639
* Adds tests
Change-Id: Id00563dfcc6f143c3e86ec380d66cffc967b8c48
Diffstat (limited to 'openstack/common')
| -rw-r--r-- | openstack/common/iniparser.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/openstack/common/iniparser.py b/openstack/common/iniparser.py index 53ca023..e91eea5 100644 --- a/openstack/common/iniparser.py +++ b/openstack/common/iniparser.py @@ -52,7 +52,10 @@ class BaseParser(object): else: key, value = line[:colon], line[colon + 1:] - return key.strip(), [value.strip()] + value = value.strip() + if value[0] == value[-1] and value[0] == "\"" or value[0] == "'": + value = value[1:-1] + return key.strip(), [value] def parse(self, lineiter): key = None |
