From 5b42dc9f5090b2406abe82cf1600b68b795b9e46 Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Tue, 10 Jul 2018 20:00:44 -0500 Subject: Use instance attribute for terminators If the `terminators` is the default, `None`, the function fails because the local variable was not updated. --- cmd2/parsing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd2/parsing.py') diff --git a/cmd2/parsing.py b/cmd2/parsing.py index 8d59aedb..84c7e27a 100644 --- a/cmd2/parsing.py +++ b/cmd2/parsing.py @@ -163,7 +163,7 @@ class StatementParser: invalid_command_chars = [] invalid_command_chars.extend(constants.QUOTES) invalid_command_chars.extend(constants.REDIRECTION_CHARS) - invalid_command_chars.extend(terminators) + invalid_command_chars.extend(self.terminators) # escape each item so it will for sure get treated as a literal second_group_items = [re.escape(x) for x in invalid_command_chars] # add the whitespace and end of string, not escaped because they -- cgit v1.2.1