diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2020-02-18 21:05:10 -0500 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2020-02-18 21:05:10 -0500 |
commit | f7441431697e4ba94202a1484721ae8acf3a4ab7 (patch) | |
tree | 234c893f8cb90138d86b668ba12d0bf448de4b52 /cmd2/cmd2.py | |
parent | 970c5fc42c69c1c03640c979df341e85e3c38848 (diff) | |
download | cmd2-git-f7441431697e4ba94202a1484721ae8acf3a4ab7.tar.gz |
Moved custom cmd2 exceptions to a separate file and removed them from public API
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r-- | cmd2/cmd2.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 0bb4921e..7b88eaf8 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -50,6 +50,7 @@ from . import utils from .argparse_custom import CompletionItem, DEFAULT_ARGUMENT_PARSER from .clipboard import can_clip, get_paste_buffer, write_to_paste_buffer from .decorators import with_argparser +from .exceptions import EmbeddedConsoleExit, EmptyStatement from .history import History, HistoryItem from .parsing import StatementParser, Statement, Macro, MacroArg, shlex_split from .rl_utils import rl_type, RlType, rl_get_point, rl_set_prompt, vt100_support, rl_make_safe_prompt, rl_warning @@ -106,16 +107,6 @@ class _SavedCmd2Env: self.sys_stdin = None -class EmbeddedConsoleExit(SystemExit): - """Custom exception class for use with the py command.""" - pass - - -class EmptyStatement(Exception): - """Custom exception class for handling behavior when the user just presses <Enter>.""" - pass - - # Contains data about a disabled command which is used to restore its original functions when the command is enabled DisabledCommand = namedtuple('DisabledCommand', ['command_function', 'help_function', 'completer_function']) |