Skip to content

Commit beee0be

Browse files
committed
Merge branch 'master' into disable_command
2 parents 4c03d88 + 704666e commit beee0be

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
@@ -600,7 +600,7 @@ def perror(self, err: Union[str, Exception], traceback_war: bool = True, err_col
600600
:param err_color: (optional) color escape to output error with
601601
:param war_color: (optional) color escape to output warning with
602602
"""
603-
if self.debug:
603+
if self.debug and sys.exc_info() != (None, None, None):
604604
import traceback
605605
traceback.print_exc()
606606

0 commit comments

Comments
 (0)