同步移动端工程、设备控制改进与发布资料
This commit is contained in:
@@ -115,6 +115,9 @@ class WifiConfigStore:
|
||||
"state": str(operation.get("state") or "idle"),
|
||||
"message": str(operation.get("message") or ""),
|
||||
}
|
||||
if operation.get("error_code") is not None:
|
||||
code = operation["error_code"]
|
||||
safe["error_code"] = code if code in {"AUTH_FAILED", "NETWORK_UNAVAILABLE", "IP_CONFIG_FAILED", "UNKNOWN"} else "UNKNOWN"
|
||||
if safe["state"] not in {"idle", "scheduled", "applying", "succeeded", "failed"}:
|
||||
raise WifiConfigError("invalid wifi operation state")
|
||||
with self._lock:
|
||||
|
||||
Reference in New Issue
Block a user