summaryrefslogtreecommitdiff
path: root/examples/custom_parser.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2021-08-23 14:20:09 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2021-08-23 14:20:09 -0400
commit16e145a27ea7b4c2dc348699c8f4cc11be4dc0b6 (patch)
treeeb0520a93dfd388360d5d816a53cf5f8a3b35d01 /examples/custom_parser.py
parent7f07f5ef66a4a3d986d265b8f7fc9d014f6d5541 (diff)
parent9d818100f3b6dfa647e58b8a0df182ea6729a197 (diff)
downloadcmd2-git-16e145a27ea7b4c2dc348699c8f4cc11be4dc0b6.tar.gz
Merge branch 'master' into topic_width
Diffstat (limited to 'examples/custom_parser.py')
-rw-r--r--examples/custom_parser.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/custom_parser.py b/examples/custom_parser.py
index 6df68bfa..ea66e7e1 100644
--- a/examples/custom_parser.py
+++ b/examples/custom_parser.py
@@ -31,6 +31,8 @@ class CustomParser(Cmd2ArgumentParser):
linum += 1
self.print_usage(sys.stderr)
+
+ # Format errors with style_warning()
formatted_message = ansi.style_warning(formatted_message)
self.exit(2, '{}\n\n'.format(formatted_message))