Skip to content

Commit

Permalink
fixed single cpu cisco bug
Browse files Browse the repository at this point in the history
  • Loading branch information
natankeddem committed Mar 6, 2024
1 parent ced2e0a commit d33fc5d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hush/hardware/cisco.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ async def get_temp(self, core: Optional[int] = None) -> None:
data = f"<configResolveClass cookie='{cookie}' inHierarchical='false' classId='processorEnvStats'></configResolveClass>"
response = await self.xml_request.post(data)
cpus = response["configResolveClass"]["outConfigs"]["processorEnvStats"]
if not isinstance(cpus, list):
cpus = [cpus]
cpu_temps = []
for cpu in cpus:
cpu_temps.append(float(cpu["@temperature"]))
Expand Down

0 comments on commit d33fc5d

Please sign in to comment.