Skip to content

Commit 5b42dc9

Browse files
authored
Use instance attribute for terminators
If the `terminators` is the default, `None`, the function fails because the local variable was not updated.
1 parent d80d672 commit 5b42dc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd2/parsing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def __init__(
163163
invalid_command_chars = []
164164
invalid_command_chars.extend(constants.QUOTES)
165165
invalid_command_chars.extend(constants.REDIRECTION_CHARS)
166-
invalid_command_chars.extend(terminators)
166+
invalid_command_chars.extend(self.terminators)
167167
# escape each item so it will for sure get treated as a literal
168168
second_group_items = [re.escape(x) for x in invalid_command_chars]
169169
# add the whitespace and end of string, not escaped because they

0 commit comments

Comments
 (0)