updates random word generator

This commit is contained in:
raphaelmaenle 2023-03-03 11:26:29 +01:00
parent eedc1d5679
commit f1911d9b15
No known key found for this signature in database
GPG Key ID: F97EBAB9C79709B3

3
bump/bump.py Normal file → Executable file
View File

@ -117,11 +117,10 @@ class Bump:
def _generate_keywords(self) -> str: def _generate_keywords(self) -> str:
pattern = re.compile('^[a-zA-Z]+$') pattern = re.compile('^[a-zA-Z]+$')
WORDS = r.get_random_words()
secret = "" secret = ""
word_count = 0 word_count = 0
while word_count < SENDER_LENGTH + PASSWORD_LENGTH: while word_count < SENDER_LENGTH + PASSWORD_LENGTH:
word = random.choice(WORDS) word = r.get_random_word()
if pattern.match(word) and len(word) < 10 and len(word) >= 4: if pattern.match(word) and len(word) < 10 and len(word) >= 4:
secret += word + "-" secret += word + "-"
word_count += 1 word_count += 1