Skip to content
Snippets Groups Projects
Commit 85bf08ee authored by Vanessa Stehr's avatar Vanessa Stehr
Browse files

Fix empty list elements when the XML list ends with a space

This resolves an issue where an Exception is raised because '' can't be converted to float
parent 235cf167
No related branches found
No related tags found
1 merge request!1Fix empty list elements when the XML list ends with a space
......@@ -202,7 +202,7 @@ class dcc():
forceArrayTopLevel = True # set flag to force the top level to be an array
if node.tag.split('}')[-1] in spaceSeperatedFieldNamesAndTypes:
try:
splitted=node.text.split(' ')
splitted=node.text.strip().split(' ')
except:
print("DEBUG")
if spaceSeperatedFieldNamesAndTypes[node.tag.split('}')[-1]]=='float':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment