Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

Commit

Permalink
fix: build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
weliasz committed Nov 4, 2021
1 parent d7a8535 commit 9c04c17
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions splunk_connect_for_snmp_mib_server/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,17 @@ def parse_index(self, translated_var_bind):
index_row = self._mib_view_controller.mibBuilder.mibSymbols[family].get(label)
index_result = dict()

while abs(label_index) < len(object_identity.getLabel()) and type(index_row).__name__ == 'MibTableColumn':
while (
abs(label_index) < len(object_identity.getLabel())
and type(index_row).__name__ == "MibTableColumn"
):
label_index = label_index - 1
label = object_identity.getLabel()[label_index]
index_row = self._mib_view_controller.mibBuilder.mibSymbols[family].get(label)
index_row = self._mib_view_controller.mibBuilder.mibSymbols[family].get(
label
)

if index_row and type(index_row).__name__ == 'MibTableRow':
if index_row and type(index_row).__name__ == "MibTableRow":
index_tuple = [v.prettyPrint() for v in index_tuple]
index_names = [v[2] for v in index_row.getIndexNames()]
index_result = dict(zip(index_names, index_tuple))
Expand Down

0 comments on commit 9c04c17

Please sign in to comment.