uqall: check if % in it before action (performance?)
This commit is contained in:
parent
2aa80f99e8
commit
009c59960c
@ -22,6 +22,7 @@ def uqall(data):
|
||||
iterator = enumerate(data)
|
||||
elif isinstance(data, dict):
|
||||
for k in list(data.keys()):
|
||||
if "%" in k:
|
||||
data[uq(k)] = data.pop(k)
|
||||
iterator = data.items()
|
||||
elif isinstance(data, str):
|
||||
@ -33,6 +34,7 @@ def uqall(data):
|
||||
if isinstance(value, (list, dict)):
|
||||
uqall(value)
|
||||
elif isinstance(value, str):
|
||||
if "%" in value:
|
||||
data[i] = uq(value)
|
||||
return data
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user