Skip to content

Commit

Permalink
Fix reading of clock name
Browse files Browse the repository at this point in the history
While trying to read a document with a clock, I get the following error:

  ...
  File ".../pytsdl/parser.py", line 1497, in _value_assign_clock
    clock.name = value[0].value
  TypeError: 'LiteralString' object does not support indexing

Removing the [0] seems to work.

Fixes #2
  • Loading branch information
simark committed Jun 12, 2016
1 parent 75c5bea commit 3ca5c3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytsdl/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,7 @@ def _value_assign_clock(self, key, value):
clock = self._get_cur_obj()

if key == 'name':
clock.name = value[0].value
clock.name = value.value
elif key == 'description':
clock.description = value.value
elif key == 'freq':
Expand Down

0 comments on commit 3ca5c3f

Please sign in to comment.