From 432fd39441ff5a4842bde94c83a610d1fb5ca2e5 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 4 Oct 2019 11:57:11 +0100 Subject: [PATCH] also stop markov chain if we chose `None` --- modules/markov.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/markov.py b/modules/markov.py index 884a3d18..d88c2d37 100644 --- a/modules/markov.py +++ b/modules/markov.py @@ -158,6 +158,8 @@ class Module(ModuleManager.BaseModule): break third_word = self._choose(third_words) + if third_word == None: + break words.append(third_word) return " ".join(words)