Skip to content

Commit 7b3bf29

Browse files
authored
Merge pull request #870 from netenglabs/fix-nxos-route-timestamp
NXOS: routes timestamp parser fix for older versions
2 parents 4badde2 + 0a2cfe8 commit 7b3bf29

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

suzieq/poller/worker/services/routes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,9 @@ def _clean_nxos_data(self, processed_data, raw_data):
228228
# Right now we only store the timestamp of the first NH change
229229
# The correct thing to do is to take all NH timestamps, and take
230230
# the latest one: TODO
231-
lastChange = entry.get('statusChangeTimestamp', [''])[0]
231+
lastChange = entry.get('statusChangeTimestamp', [''])
232+
if isinstance(lastChange, list):
233+
lastChange = lastChange[0]
232234
if lastChange:
233235
entry['statusChangeTimestamp'] = get_timestamp_from_cisco_time(
234236
lastChange, raw_data[0]['timestamp']/1000)

0 commit comments

Comments
 (0)