Skip to content

Commit

Permalink
Merge pull request #1343 from paketb0te/patch-1
Browse files Browse the repository at this point in the history
Cast uptime values to int before processing
  • Loading branch information
mirceaulinic authored Dec 30, 2020
2 parents 5a2adcb + a590137 commit 6802a04
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions napalm/nxos/nxos.py
Original file line number Diff line number Diff line change
Expand Up @@ -837,10 +837,10 @@ def get_facts(self):
"sys_ver_str", show_version.get("kickstart_ver_str", "")
)

uptime_days = show_version.get("kern_uptm_days", 0)
uptime_hours = show_version.get("kern_uptm_hrs", 0)
uptime_mins = show_version.get("kern_uptm_mins", 0)
uptime_secs = show_version.get("kern_uptm_secs", 0)
uptime_days = int(show_version.get("kern_uptm_days", 0))
uptime_hours = int(show_version.get("kern_uptm_hrs", 0))
uptime_mins = int(show_version.get("kern_uptm_mins", 0))
uptime_secs = int(show_version.get("kern_uptm_secs", 0))

uptime = 0
uptime += uptime_days * 24 * 60 * 60
Expand Down

0 comments on commit 6802a04

Please sign in to comment.