diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-11-27 14:56:06 -0500 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-11-27 14:56:06 -0500 |
commit | 1694578f8bcccda026b1c23ce14155f5e2326184 (patch) | |
tree | 075513d8fc878f70cea15e2023392c76f6ce567d /cmd2/argparse_custom.py | |
parent | 711349ca3eda129b666e4c68d79ad6634f86e3be (diff) | |
download | cmd2-git-1694578f8bcccda026b1c23ce14155f5e2326184.tar.gz |
Fixed bug where a redefined ansi.style_error was not being used in all cmd2 files
Diffstat (limited to 'cmd2/argparse_custom.py')
-rw-r--r-- | cmd2/argparse_custom.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd2/argparse_custom.py b/cmd2/argparse_custom.py index f8a9ec60..cfe9ea5e 100644 --- a/cmd2/argparse_custom.py +++ b/cmd2/argparse_custom.py @@ -185,7 +185,7 @@ import sys from argparse import ZERO_OR_MORE, ONE_OR_MORE, ArgumentError, _ from typing import Callable, Optional, Tuple, Type, Union -from .ansi import ansi_aware_write, style_error +from . import ansi # Used in nargs ranges to signify there is no maximum INFINITY = float('inf') @@ -747,7 +747,7 @@ class Cmd2ArgumentParser(argparse.ArgumentParser): linum += 1 self.print_usage(sys.stderr) - formatted_message = style_error(formatted_message) + formatted_message = ansi.style_error(formatted_message) self.exit(2, '{}\n\n'.format(formatted_message)) # noinspection PyProtectedMember @@ -806,7 +806,7 @@ class Cmd2ArgumentParser(argparse.ArgumentParser): if message: if file is None: file = sys.stderr - ansi_aware_write(file, message) + ansi.ansi_aware_write(file, message) # The default ArgumentParser class for a cmd2 app |