From 9b9e813bb921ca082fc78672de0bd9e75ff573b0 Mon Sep 17 00:00:00 2001 From: "Hristos N. Triantafillou" Date: Tue, 24 Dec 2019 10:13:46 -0600 Subject: [PATCH] The close is implicit, blacken the file as well --- openmw2mwini.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openmw2mwini.py b/openmw2mwini.py index fd1cef4..e407768 100755 --- a/openmw2mwini.py +++ b/openmw2mwini.py @@ -13,7 +13,6 @@ except IndexError: with open(cfg_file, "r") as cfg: lines = cfg.readlines() - cfg.close() content_lines = [] @@ -23,7 +22,11 @@ for l in lines: count = 3 for c in content_lines: - if "Morrowind.esm" not in c and "Tribunal.esm" not in c and "Bloodmoon.esm" not in c: + if ( + "Morrowind.esm" not in c + and "Tribunal.esm" not in c + and "Bloodmoon.esm" not in c + ): ini_string += "GameFile{}=".format(count) + c.split("=")[1].strip() + "\n" count += 1 -- 2.45.2