aboutsummaryrefslogtreecommitdiff
path: root/modules/markov.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-10-09 17:54:28 +0100
committerGravatar jesopo2019-10-09 17:54:28 +0100
commit87a7d74fc33c94df719f50be3ca016dd2809b617 (patch)
tree72a0667d61834ffe70c0376ba13e120de1a3c54d /modules/markov.py
parent`-V` command line arg should still effect stdout (diff)
signature
a chain has failed to generate if the result is the same as the input
Diffstat (limited to 'modules/markov.py')
-rw-r--r--modules/markov.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/markov.py b/modules/markov.py
index 1508ad99..91360ef0 100644
--- a/modules/markov.py
+++ b/modules/markov.py
@@ -167,4 +167,7 @@ class Module(ModuleManager.BaseModule):
break
words.append(third_word)
+ if words == first_words:
+ return None
+
return " ".join(words)