fix(ucepsa): read deployment mode from dict cursor

This commit is contained in:
Victor Fraile Garcia 2026-07-17 11:47:18 +02:00
parent faf1804558
commit b2a09f3826

View File

@ -80,7 +80,7 @@ def deployment_mode(cur) -> str:
row = cur.fetchone() row = cur.fetchone()
if not row: if not row:
raise RuntimeError("No existe deployment_config CUTTERS") raise RuntimeError("No existe deployment_config CUTTERS")
return str(row[0]) return str(row["mode"])
def print_json(payload: Any) -> None: def print_json(payload: Any) -> None:
@ -435,5 +435,5 @@ if __name__ == "__main__":
try: try:
raise SystemExit(main()) raise SystemExit(main())
except Exception as exc: except Exception as exc:
print(f"[ERROR] {exc}", file=sys.stderr) print(f"[ERROR] {type(exc).__name__}: {exc!r}", file=sys.stderr)
raise SystemExit(1) raise SystemExit(1)