diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-03-09 22:58:05 -0500 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-03-09 22:58:05 -0500 |
commit | 704666ea25e9abb93c6c8d2e3ae62e6cb0928450 (patch) | |
tree | 5f850d6195f5b53a44bc87f053c887f8b7be5e3c /cmd2/cmd2.py | |
parent | d6c6cf358c60eb75d6e6ffdbe73769fd180c47af (diff) | |
download | cmd2-git-704666ea25e9abb93c6c8d2e3ae62e6cb0928450.tar.gz |
Only print a traceback if there is one to print
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r-- | cmd2/cmd2.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index b3a61212..0d1d0b51 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -587,7 +587,7 @@ class Cmd(cmd.Cmd): :param err_color: (optional) color escape to output error with :param war_color: (optional) color escape to output warning with """ - if self.debug: + if self.debug and sys.exc_info() != (None, None, None): import traceback traceback.print_exc() |