Skip to content

Commit

Permalink
Initial fix for trap receiver.
Browse files Browse the repository at this point in the history
  • Loading branch information
ziesemer committed Mar 26, 2023
1 parent 18acb9a commit f602586
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions puresnmp/api/raw.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from typing import Type as TType
from typing import TypeVar, cast

from x690.types import Integer, Null, ObjectIdentifier, Sequence
from x690.types import Integer, Null, ObjectIdentifier, OctetString, Sequence
from x690.types import X690Type as Type

from puresnmp.plugins import mpm
Expand Down Expand Up @@ -897,7 +897,7 @@ async def handler(data: bytes) -> bytes:

as_sequence = Sequence.decode(packet.data)

obj = cast(Tuple[Integer, Integer, Trap], as_sequence[0])
obj = cast(Tuple[Integer, OctetString, Trap], as_sequence)

mproc = mpm.create(obj[0].value, handler, lcd)
trap = mproc.decode(packet.data, credentials)
Expand Down

0 comments on commit f602586

Please sign in to comment.