Fixed blacklist param for captcha script.

* Also closes the word list file handles.

Change-Id: I4feac2eca6ed29756b6fcbd38acc5e16bc26b2ce
This commit is contained in:
Aaron Schulz 2012-12-18 13:20:34 -08:00
parent bcb5204d8d
commit 3b987fb098

View file

@ -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