From ccb50f33b5cdff1f354bdc24618a6c665f3ab68a Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Sun, 21 Feb 2021 11:46:09 -0500 Subject: Start making small changes to fix mypy warnings --- cmd2/transcript.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cmd2/transcript.py') diff --git a/cmd2/transcript.py b/cmd2/transcript.py index 68fb7be0..5cd59ae8 100644 --- a/cmd2/transcript.py +++ b/cmd2/transcript.py @@ -60,6 +60,9 @@ class Cmd2TestCase(unittest.TestCase): tfile.close() def _test_transcript(self, fname: str, transcript): + if self.cmdapp is None: + return + line_num = 0 finished = False line = ansi.strip_style(next(transcript)) -- cgit v1.2.1