Skip to content

Commit

Permalink
Reorder logic
Browse files Browse the repository at this point in the history
  • Loading branch information
stveit committed Apr 1, 2022
1 parent 661ffb2 commit 9a08b33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/nav/mibs/juniper_mib.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,14 @@ def _row_to_sensor(self, config, index, row):
options defined in the config dict.
"""
internal_name = config['internal_prefix'] + str(index)
descr = row.get(config['descr'], internal_name) + " Temperature"

# Dont include sensor if temperature not set
readout = row.get(config['readout'], 0)
if not readout:
return

internal_name = config['internal_prefix'] + str(index)
descr = row.get(config['descr'], internal_name) + " Temperature"

mibobject = self.nodes.get(config['readout'])
readout_oid = str(mibobject.oid + str(index))

Expand Down

0 comments on commit 9a08b33

Please sign in to comment.