file i/o: use 'with' keyword
This commit is contained in:
@@ -98,7 +98,8 @@ def normalize_text(seed):
|
||||
|
||||
def load_wordlist(filename):
|
||||
path = os.path.join(os.path.dirname(__file__), 'wordlist', filename)
|
||||
s = open(path,'r').read().strip()
|
||||
with open(path, 'r') as f:
|
||||
s = f.read().strip()
|
||||
s = unicodedata.normalize('NFKD', s)
|
||||
lines = s.split('\n')
|
||||
wordlist = []
|
||||
|
||||
Reference in New Issue
Block a user