From eb98843e1dc7ea7d3914b9b126e56ec19b9032b5 Mon Sep 17 00:00:00 2001 From: poikilos <7557867+poikilos@users.noreply.github.com> Date: Sun, 28 Nov 2021 23:52:06 -0500 Subject: [PATCH] Fix the use of an uninitialized variable. --- utilities/compatiblizemod.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utilities/compatiblizemod.py b/utilities/compatiblizemod.py index a3f6dae..1b3dec8 100755 --- a/utilities/compatiblizemod.py +++ b/utilities/compatiblizemod.py @@ -21,9 +21,11 @@ def add_depends(mod_path): # shutil.copy(modpack_conf, modpack_txt) with open(modpack_txt, 'w') as outs: wroteCount = 0 + lineN = 0 with open(modpack_conf, 'r') as ins: for rawL in ins: - line = line.strip() + lineN += 1 # Start counting at 1. + line = rawL.strip() signI = line.find("=") if signI < 1: continue