summaryrefslogtreecommitdiff
path: root/examples/custom_parser.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2019-11-27 14:56:06 -0500
committerKevin Van Brunt <kmvanbrunt@gmail.com>2019-11-27 14:56:06 -0500
commit1694578f8bcccda026b1c23ce14155f5e2326184 (patch)
tree075513d8fc878f70cea15e2023392c76f6ce567d /examples/custom_parser.py
parent711349ca3eda129b666e4c68d79ad6634f86e3be (diff)
downloadcmd2-git-1694578f8bcccda026b1c23ce14155f5e2326184.tar.gz
Fixed bug where a redefined ansi.style_error was not being used in all cmd2 files
Diffstat (limited to 'examples/custom_parser.py')
-rw-r--r--examples/custom_parser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/custom_parser.py b/examples/custom_parser.py
index efeb362e..7c154176 100644
--- a/examples/custom_parser.py
+++ b/examples/custom_parser.py
@@ -5,7 +5,7 @@ Defines the CustomParser used with override_parser.py example
import sys
from cmd2 import Cmd2ArgumentParser, set_default_argument_parser
-from cmd2.ansi import style_warning
+from cmd2 import ansi
# First define the parser
@@ -27,7 +27,7 @@ class CustomParser(Cmd2ArgumentParser):
linum += 1
self.print_usage(sys.stderr)
- formatted_message = style_warning(formatted_message)
+ formatted_message = ansi.style_warning(formatted_message)
self.exit(2, '{}\n\n'.format(formatted_message))