Skip to content

writeCommit problem #2

@korwin7474

Description

@korwin7474

Im managing a variable that can assume '0' or '1' value.
if generic mib browser try to set '3' an exception make the agent crash.
of course i can try-except that, but im not able to send to client (mib browser) the error.
Thats the code on my pythonized mib:

def writeTest(self, varBind, **context):
    cbFun = context['cbFun']
    name, value = varBind
    if value in [0,1]:
        cbFun(varBind, **context)
    else:
        pass


def writeCommit(self, varBind, **context):
    # Put your code here
    print("arrivato al write commit")
    cbFun = context['cbFun']
    name, value = varBind
    cbFun((name, value), **context)
    my_agent.setcConnection(value)

can anyone help me?
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions