From 219d90a5745d7d62b3fd1be0887be6f6202447f4 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 6 Feb 2013 16:55:15 -0500 Subject: [PATCH] ui.cli: Don't start the QuestionCommandLine with an empty stack There's not much point in a question-answering shell if there are no questions to be answered. --- quizzer/ui/cli.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/quizzer/ui/cli.py b/quizzer/ui/cli.py index d2859cf..b799e1e 100644 --- a/quizzer/ui/cli.py +++ b/quizzer/ui/cli.py @@ -112,6 +112,8 @@ class QuestionCommandLine (_cmd.Cmd): class CommandLineInterface (UserInterface): def run(self): + if not self.stack: + return cmd = QuestionCommandLine(ui=self) cmd.cmdloop() print() -- 2.26.2