Skip to content

Commit

Permalink
V1.19.00
Browse files Browse the repository at this point in the history
  • Loading branch information
jgyates committed Dec 19, 2023
1 parent 6c9614c commit 914320b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion addon/gensnmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,12 @@ def UpdateSNMPData(self, Path, Value):
if isinstance(Value, int):
self.mibDataIdx[oid].value = Value
else:
self.mibDataIdx[oid].value = int(self.removeAlpha(Value))
try:
# this will convert a float string to an int
Value = float(self.removeAlpha(Value))
self.mibDataIdx[oid].value = int(Value)
except:
self.mibDataIdx[oid].value = int(self.removeAlpha(Value))
else:
self.LogError(
"Invalid type in UpdateSNMPData: "
Expand Down

0 comments on commit 914320b

Please sign in to comment.