mirror of
https://github.com/taylanbakircioglu/haproxy-openmanager.git
synced 2026-09-21 01:53:24 +00:00
d40c701272
Remove redundant local 'import json' statements that caused: "cannot access local variable 'json' where it is not associated with a value" Root cause: Local import inside try block made 'json' a local variable, but except clause referenced json.JSONDecodeError before assignment. Changes: - Line 197: Remove local import, use global json (line 5) - Line 514: Remove 'import json as _json', use global json - Use ValueError instead of json.JSONDecodeError (equivalent, JSONDecodeError is a subclass of ValueError) This was causing config generation to fail completely, returning error message as config content instead of actual HAProxy configuration.