mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-24 00:04:15 +00:00
Fixed blacklist param for captcha script.
* Also closes the word list file handles. Change-Id: I4feac2eca6ed29756b6fcbd38acc5e16bc26b2ce
This commit is contained in:
parent
bcb5204d8d
commit
3b987fb098
|
@ -170,7 +170,10 @@ def pick_word(words, blacklist, verbose, nwords, min_length, max_length):
|
|||
sys.exit("Unable to find valid word combinations")
|
||||
|
||||
def read_wordlist(filename):
|
||||
return [x.strip().lower() for x in open(wordlist).readlines()]
|
||||
f = open(filename)
|
||||
words = [x.strip().lower() for x in f.readlines()]
|
||||
f.close()
|
||||
return words
|
||||
|
||||
if __name__ == '__main__':
|
||||
"""This grabs random words from the dictionary 'words' (one
|
||||
|
|
Loading…
Reference in a new issue