summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2019-06-29 12:48:13 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2019-06-29 12:48:13 -0400
commit1ca3ce9361ef0eb9c98ce8ec4cbd76e7b30140b2 (patch)
treeedf9d440132a3b318dd8a778a246cb04bb98057c /cmd2/cmd2.py
parente73661cee4215a0ecf496316bbeac4663c722ed2 (diff)
downloadcmd2-git-1ca3ce9361ef0eb9c98ce8ec4cbd76e7b30140b2.tar.gz
Handling alternate cases of allow_ansi values
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r--cmd2/cmd2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index 4abe4d07..31399620 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -564,7 +564,7 @@ class Cmd(cmd.Cmd):
@allow_ansi.setter
def allow_ansi(self, new_val: str) -> None:
"""Read-only property needed to support do_set when it sets allow_ansi"""
- if new_val not in (ansi.ANSI_TERMINAL, ansi.ANSI_ALWAYS, ansi.ANSI_NEVER):
+ if new_val.lower() not in (ansi.ANSI_TERMINAL.lower(), ansi.ANSI_ALWAYS.lower(), ansi.ANSI_NEVER.lower()):
self.perror('Invalid value: {} (valid values: {}, {}, {})'.format(new_val, ansi.ANSI_TERMINAL,
ansi.ANSI_ALWAYS, ansi.ANSI_NEVER))
else: