summaryrefslogtreecommitdiffstats
path: root/nova/openstack
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2012-07-02 11:34:21 -0400
committerRussell Bryant <rbryant@redhat.com>2012-07-02 11:34:21 -0400
commitcb6bf34898771e6171ef5dbf898ec5705c904195 (patch)
tree1b5ebc02c5ec61ccf3ab39fd525577a4d2ef35a2 /nova/openstack
parent2633156659bd767b5b206fba9fbf68d2dcb62c51 (diff)
downloadnova-cb6bf34898771e6171ef5dbf898ec5705c904195.tar.gz
nova-cb6bf34898771e6171ef5dbf898ec5705c904195.tar.xz
nova-cb6bf34898771e6171ef5dbf898ec5705c904195.zip
Sync iniparser from openstack-common.
This patch pulls in the latest version of the iniparser module from openstack-common. It adds support for quoting option values. For example: foo = "option with a trailing space now works " Change-Id: Ia2b6e1a7888ceb04e6befe3b221e3deef9f53f0b
Diffstat (limited to 'nova/openstack')
-rw-r--r--nova/openstack/common/iniparser.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/nova/openstack/common/iniparser.py b/nova/openstack/common/iniparser.py
index 53ca02334..e91eea538 100644
--- a/nova/openstack/common/iniparser.py
+++ b/nova/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