Fix passwordy sentence join
This commit is contained in:
Voussoir 2015-06-26 14:38:22 -07:00
parent a62f6e582d
commit 0b57fc67da

View file

@ -59,8 +59,9 @@ def make_sentence(length=None, joiner=' '):
import dictionary.common as common
if length is None:
length = DEFAULT_LENGTH
result = joiner.join(random.choice(common.words) for x in range(length))
result = result.replace(' ', joiner)
words = [random.choice(common.words) for x in range(length)]
words = [w.replace(' ', joiner) for w in words]
result = joiner.join(words)
return result
if __name__ == '__main__':