Bugfix: split on first colon only

This commit is contained in:
Benjamin Collet 2018-07-04 13:56:59 +02:00
parent 473a43d04d
commit d81f48f8da

View file

@ -52,8 +52,8 @@ def read_input(object_file):
attr = [] attr = []
for line in object_file.readlines(): for line in object_file.readlines():
if not line: continue if not line: continue
attr.append({'name':line.split(':')[0].strip(), attr.append({'name':line.split(':', 1)[0].strip(),
'value':line.split(':')[1].strip() }) 'value':line.split(':', 1)[1].strip() })
object_data = { object_data = {
"objects": { "objects": {