From 93d46daa8dc66462132b32b632c1d3e152c400a6 Mon Sep 17 00:00:00 2001 From: gescheit Date: Fri, 17 Jan 2025 23:25:48 +0300 Subject: [PATCH 1/3] return varbinds if "not increasing" --- fastsnmp/snmp_parser.pyx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/fastsnmp/snmp_parser.pyx b/fastsnmp/snmp_parser.pyx index 2420cc3..403baf2 100644 --- a/fastsnmp/snmp_parser.pyx +++ b/fastsnmp/snmp_parser.pyx @@ -992,17 +992,19 @@ def parse_varbind(list var_bind_list not None, tuple orig_main_oids not None, tu for pos in rest_oids_positions: if pos in skip_column: continue - next_oids[pos] = "%s.%s" % (orig_main_oids[pos], last_seen_index[pos]) if not check_is_growing(first_seen_index[pos], last_seen_index[pos]): - raise SNMPException("not increasing %s vs %s for %s" % (last_seen_index[pos], - first_seen_index[pos], - orig_main_oids[pos])) + return result, tuple(next_oids) + # raise SNMPException("not increasing %s vs %s for %s" % (last_seen_index[pos], + # first_seen_index[pos], + # orig_main_oids[pos])) + next_oids[pos] = "%s.%s" % (orig_main_oids[pos], last_seen_index[pos]) else: for pos in rest_oids_positions: if not check_is_growing(first_seen_index[pos], last_seen_index[pos]): - raise SNMPException("not increasing %s vs %s for %s" % (last_seen_index[pos], - first_seen_index[pos], - orig_main_oids[pos])) + return result, tuple(next_oids) + # raise SNMPException("not increasing %s vs %s for %s" % (last_seen_index[pos], + # first_seen_index[pos], + # orig_main_oids[pos])) next_oids = [ "%s.%s" % (orig_main_oids[p], last_seen_index[p]) for p in rest_oids_positions] return result, tuple(next_oids) From 64f1158d61a5ffb180dc15a40b2178a4de8949ab Mon Sep 17 00:00:00 2001 From: gescheit Date: Fri, 17 Jan 2025 23:30:24 +0300 Subject: [PATCH 2/3] Update python-package.yml --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index d433d13..3ac0a7a 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -17,7 +17,7 @@ jobs: - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: - python-version: '3.7' + python-version: '3.10' - name: Install Tox run: python3 -m pip install tox - name: Run Tox From b16df2f073929a0feb41235d238750a6bdf49657 Mon Sep 17 00:00:00 2001 From: gescheit Date: Fri, 17 Jan 2025 23:32:22 +0300 Subject: [PATCH 3/3] Update tox.ini --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 62c94f4..cd47f8c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py37 +envlist = py310 [testenv] deps = cython