Fix nested dict/list structures

This commit is contained in:
Christophe de Vienne 2012-02-20 11:37:46 +01:00
parent 06b41a7207
commit 15dd8b0206

View File

@ -65,7 +65,7 @@ def array_from_params(datatype, params, path):
from_param(datatype[0], value) for value in params.getall(path)]
else:
indexes = set()
r = re.compile('^%s\[(?P<index>\d+)\]' % path)
r = re.compile('^%s\[(?P<index>\d+)\]' % re.escape(path))
for p in params.keys():
m = r.match(p)
@ -86,7 +86,7 @@ def array_from_params(datatype, params, path):
def dict_from_params(datatype, params, path):
keys = set()
r = re.compile('^%s\[(?P<key>\w+)\]' % path)
r = re.compile('^%s\[(?P<key>[a-zA-Z0-9_\.]+)\]' % re.escape(path))
for p in params.keys():
m = r.match(p)