Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _load_state(path):
"""Load a GUI state from a JSON file."""
try:
logger.debug("Load %s for GUIState.", path)
data = load_json(str(path))
except json.decoder.JSONDecodeError as e: # pragma: no cover
logger.warning("Error decoding JSON: %s", e)
data = {}
return _bunchify(data)