Skip to content

Commit c2890a4

Browse files
committed
Merge branch 'master' into store_output
2 parents 2ea9658 + 704666e commit c2890a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd2/cmd2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ def perror(self, err: Union[str, Exception], traceback_war: bool = True, err_col
587587
:param err_color: (optional) color escape to output error with
588588
:param war_color: (optional) color escape to output warning with
589589
"""
590-
if self.debug:
590+
if self.debug and sys.exc_info() != (None, None, None):
591591
import traceback
592592
traceback.print_exc()
593593

0 commit comments

Comments
 (0)