diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-07-03 15:25:50 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-07-03 15:25:50 -0400 |
commit | 76d584f46104d2d92e98990e3cd3302974763ac5 (patch) | |
tree | 22164caea536a7eed0d29a545fe067182d8f1a52 /cmd2/argparse_custom.py | |
parent | 5b2ef868e7b3354dc4016dfeb28997d1b6549b2d (diff) | |
download | cmd2-git-76d584f46104d2d92e98990e3cd3302974763ac5.tar.gz |
Removed unused custom_error_message code
Diffstat (limited to 'cmd2/argparse_custom.py')
-rw-r--r-- | cmd2/argparse_custom.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/cmd2/argparse_custom.py b/cmd2/argparse_custom.py index 0b0fa981..965b0bf0 100644 --- a/cmd2/argparse_custom.py +++ b/cmd2/argparse_custom.py @@ -300,17 +300,6 @@ class Cmd2ArgParser(argparse.ArgumentParser): super().__init__(*args, **kwargs) register_custom_actions(self) - self._custom_error_message = '' - - # Begin cmd2 customization - def set_custom_message(self, custom_message: str = '') -> None: - """ - Allows an error message override to the error() function, useful when forcing a - re-parse of arguments with newly required parameters - """ - self._custom_error_message = custom_message - # End cmd2 customization - def add_subparsers(self, **kwargs): """Custom override. Sets a default title if one was not given.""" if 'title' not in kwargs: @@ -320,10 +309,6 @@ class Cmd2ArgParser(argparse.ArgumentParser): def error(self, message: str) -> None: """Custom override that applies custom formatting to the error message""" - if self._custom_error_message: - message = self._custom_error_message - self._custom_error_message = '' - lines = message.split('\n') linum = 0 formatted_message = '' |