Skip to content

Commit

Permalink
xml tuple may or may not contain spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-brajer committed Dec 6, 2020
1 parent 29fbd2c commit bcbdbc8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/blueprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ def _parse(self, text, targetType):
return float(text)

elif targetType == 'tuple':
return tuple(self._parse(item, 'int') for item in text.split(', '))
return tuple(self._parse(item, 'int') for item in
text.replace(' ', '').split(','))

raise ValueError('Unknown "{0}" target type!'.format(targetType))

Expand Down

0 comments on commit bcbdbc8

Please sign in to comment.