From: W. Trevor King Date: Wed, 6 Feb 2013 21:55:15 +0000 (-0500) Subject: ui.cli: Don't start the QuestionCommandLine with an empty stack X-Git-Tag: v0.1~11 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=219d90a5745d7d62b3fd1be0887be6f6202447f4;p=quizzer.git 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. --- 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()