From 9bab8e95a13451882db9de38cb088f3d48ccd1e7 Mon Sep 17 00:00:00 2001 From: Claus Lohmar Date: Mon, 27 Jul 2026 07:26:32 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20storage.cfg=20parser=20was=20stripping?= =?UTF-8?q?=20indentation=20before=20checking=20line.startswith('=20')=20?= =?UTF-8?q?=E2=80=94=20property=20lines=20never=20parsed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/app.py b/backend/app.py index 8f70fc2..f68f0a9 100644 --- a/backend/app.py +++ b/backend/app.py @@ -104,19 +104,19 @@ def storage_pools(): lines = cfg.read_text() current = {} for line in lines.split("\n"): - line = line.strip() - if not line or line.startswith("#"): + stripped = line.strip() + if not stripped or stripped.startswith("#"): continue - if ":" in line and not line.startswith(" "): + if ":" in stripped and not line.startswith(" "): if current and current.get("name"): pools.append(current) - parts = line.split(":", 1) + parts = stripped.split(":", 1) stype = parts[0].strip() sname = parts[1].strip() if len(parts) > 1 else "" current = {"name": sname, "type": stype} elif line.startswith(" ") and current: - if " " in line: - key, val = line.strip().split(" ", 1) + if " " in stripped: + key, val = stripped.split(" ", 1) current[key] = val if current and current.get("name"): pools.append(current)