Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting DiameterAVP data to zero will result in an exception whenever DiameterAVP.length is called. #3

Open
ofraiwan opened this issue Jan 24, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ofraiwan
Copy link

If DiameterAVP is initialized with data = 0, an UnboundLocalError (local variable 'length' referenced before assignment) is raised whenever DiameterAVP.length attribute is called, for example in DiameterAVP.dump method.

The error stems from the if condition at line 379 in base.py
image

Values of zero should be considered as valid integers and represent a meaningful value.

@heimiricmr heimiricmr added the bug Something isn't working label Jan 24, 2022
@heimiricmr heimiricmr self-assigned this Jan 24, 2022
@heimiricmr
Copy link
Owner

Hi @ofraiwan,

Thanks for reporting the issue.

It is already fixed. Please try with the latest commit and let me know.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants