fixed another possibility for the bots to get stuck

This commit is contained in:
Lynne 2018-10-29 11:23:01 +10:00
parent f39fbc9c67
commit 33ea8fe830

View file

@ -29,8 +29,10 @@ def make_sentence(output):
os.remove("toots-copy.db")
sentence = None
while sentence is None:
tries = 0
while sentence is None and tries < 10:
sentence = model.make_short_sentence(500, tries=10000)
tries = tries + 1
sentence = re.sub("^@\u202B[^ ]* ", "", sentence)
output.send(sentence)