split lists if they contain more than 2 commas
This commit is contained in:
parent
e903150fd4
commit
fc9ff4c8b2
@ -232,6 +232,10 @@ def flatten(tables):
|
|||||||
|
|
||||||
print("\"" + keyname + "\":", "\"" + str(out[fullkeyname]) + "\",")
|
print("\"" + keyname + "\":", "\"" + str(out[fullkeyname]) + "\",")
|
||||||
|
|
||||||
|
# if the item has at least two commas in it, split it
|
||||||
|
if tables[table][key].count(',') >= 2:
|
||||||
|
out[fullkeyname] = map(lambda x: x.strip(), tables[table][key].split(","))
|
||||||
|
|
||||||
print("}")
|
print("}")
|
||||||
return out
|
return out
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user