Change in pysim[master]: utils: split string formatting from dec_addr_tlv

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Mon May 3 14:18:41 UTC 2021


dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/24010 )

Change subject: utils: split string formatting from dec_addr_tlv
......................................................................


Patch Set 3:

(2 comments)

https://gerrit.osmocom.org/c/pysim/+/24010/2/pySim/cards.py 
File pySim/cards.py:

https://gerrit.osmocom.org/c/pysim/+/24010/2/pySim/cards.py@32 
PS2, Line 32: def format_addr(addr, addr_type='00'):
> Would be nice to always have type hints with the new API.
Done


https://gerrit.osmocom.org/c/pysim/+/24010/2/pySim/utils.py 
File pySim/utils.py:

https://gerrit.osmocom.org/c/pysim/+/24010/2/pySim/utils.py@642 
PS2, Line 642: 	return (None, None)
> Shouldn't this be considered an error?
Before the split it was returning an empty string, this is the equivalent. Also when using this for decoding the result can be directly encoded to json. However I think its worth to throw an execption when an addr_type is detected that can not be decoded. (if no addr+type can be found in the TLV hex str its ok to return None)



-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/24010
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Id017b0786089adac4d6c5be688742eaa9699e529
Gerrit-Change-Number: 24010
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Comment-Date: Mon, 03 May 2021 14:18:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210503/21c31370/attachment.htm>


More information about the gerrit-log mailing list