summaryrefslogtreecommitdiff
path: root/cmd2/transcript.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2021-02-22 15:58:48 -0500
committerGitHub <noreply@github.com>2021-02-22 15:58:48 -0500
commit97f14b266e038a5d4acf7841d538cf37f066d328 (patch)
treef5734a89a0f8739546158f3215656e333dcf31c6 /cmd2/transcript.py
parent9c60ac6f3169f9df37e6c5166844fb9cf5f6766d (diff)
parentfa0b55c51a4810dc1f89e616a4adb92fa9e31c6c (diff)
downloadcmd2-git-97f14b266e038a5d4acf7841d538cf37f066d328.tar.gz
Merge pull request #1060 from python-cmd2/mypy
Start making small changes to fix mypy warnings
Diffstat (limited to 'cmd2/transcript.py')
-rw-r--r--cmd2/transcript.py3
1 files changed, 3 insertions, 0 deletions
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))