close open file
This commit is contained in:
parent
529ba583b7
commit
db6ddea0ed
10
ini.py
10
ini.py
@ -123,11 +123,11 @@ def get_effects(char):
|
||||
effects = ["realization", "hearts", "reaction", "impact"]
|
||||
if not exists(p_path): return effects
|
||||
|
||||
lines = open(p_path).read().split("\n")
|
||||
for line in lines:
|
||||
effect = line.split("=")[0].rstrip()
|
||||
if effect and effect not in effects:
|
||||
effects.append(effect)
|
||||
with open(p_path).read().split("\n") as lines:
|
||||
for line in lines:
|
||||
effect = line.split("=")[0].rstrip()
|
||||
if effect and effect not in effects:
|
||||
effects.append(effect)
|
||||
|
||||
return effects
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user