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)