Skip to content

Conversation

@hishamanver
Copy link

@hishamanver hishamanver commented Dec 18, 2023

fixes the decode_from_tbcd() method calls for the MsisdnAVP and StnSrAVP

additionally have some whitespace cleanup (my editor does this automatically, but i can remove if required)

Before

>>> ula.subscription_data_avp.msisdn_avp.decode()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/site-packages/bromelia/avps/etsi_3gpp/ts_129_329.py", line 48, in decode
    return decode_from_tbcd(self.data)
  File "/usr/local/lib/python3.9/site-packages/bromelia/utils.py", line 246, in decode_from_tbcd
    if "f" not in bits:
TypeError: a bytes-like object is required, not 'str'

>>> ula.subscription_data_avp.stn_sr_avp.decode()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/site-packages/bromelia/avps/etsi_3gpp/ts_129_272.py", line 65, in decode
    return decode_from_tbcd(self.data)
  File "/usr/local/lib/python3.9/site-packages/bromelia/utils.py", line 246, in decode_from_tbcd
    if "f" not in bits:
TypeError: a bytes-like object is required, not 'str'

After

>>> ula.subscription_data_avp.stn_sr_avp.decode()
'61418070329'
>>> ula.subscription_data_avp.msisdn_avp.decode()
'61000000000'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant