Skip to content

Commit

Permalink
fix some lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
adamus1red authored Oct 1, 2024
1 parent 012d9c1 commit 57c4827
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions snmp/powermon-snmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ def getHPASMData():

return hdata


def getIPMIdata():
global error, errorString
error = 2
Expand All @@ -318,18 +319,16 @@ def getIPMIdata():
rawdata = str(output.stdout).replace("\t", " ").replace("\n ", "\n").split("\n")

hdata = {}
hdata["psu"] = {} # Init PSU data structure
hdata["psu"][0] = {} # Only one value is returned.
hdata["psu"] = {} # Init PSU data structure
hdata["psu"][0] = {} # Only one value is returned.

for line in rawdata:
if re.match(psu_reading, line):
verboseMsg("found power meter reading: " + line)
junk, meter_reading = line.split(":", 1)
hdata["psu"][0]["reading"] = psu_reading.replace("Watts", "").strip()

return hdata


return hdata


# Argument Parsing
Expand Down

0 comments on commit 57c4827

Please sign in to comment.