From 3ca5c3ff55deb7e44309dd7514deb8dac4c19751 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Sat, 11 Jun 2016 22:59:19 -0400 Subject: [PATCH] Fix reading of clock name 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 --- pytsdl/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytsdl/parser.py b/pytsdl/parser.py index 374685d..2d6a4e5 100644 --- a/pytsdl/parser.py +++ b/pytsdl/parser.py @@ -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':