Fix for IndexError thrown by _consume_separated_string

This commit is contained in:
Ben 2019-10-09 01:14:02 +01:00
parent b1b11e9f70
commit 198a015c70

View File

@ -65,7 +65,7 @@ class _ArgumentDeserializer:
raise ChecklistError('Could not invoke listener due to checklist failure') raise ChecklistError('Could not invoke listener due to checklist failure')
def _consume_separated_string(self, ctx): def _consume_separated_string(self, ctx):
if ctx.argument[0] in self.string_delimiter: if ctx.argument and ctx.argument[0] in self.string_delimiter:
while not ctx.argument.endswith(ctx.argument[0]): while not ctx.argument.endswith(ctx.argument[0]):
ctx.argument += self.string_separator + next(ctx.arguments) ctx.argument += self.string_separator + next(ctx.arguments)
ctx.argument = ctx.argument[1:-1] ctx.argument = ctx.argument[1:-1]