[M] Change in pysim[master]: filesystem: pass total_len to construct of when encoding file contents
Attention is currently required from: laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38195?usp=email ) Change subject: filesystem: pass total_len to construct of when encoding file contents ...................................................................... Patch Set 2: (4 comments) File pySim/filesystem.py: https://gerrit.osmocom.org/c/pysim/+/38195/comment/590b1234_be0b47ef?usp=ema... : PS1, Line 182: '
unrelated cosmetic change. […] Done
https://gerrit.osmocom.org/c/pysim/+/38195/comment/b190bb7d_3d5269df?usp=ema... : PS1, Line 747: if total_len is not None:
this could deserve some documentation (doc-string or comment). […] In case the size is not specified, the default value of the parameter in the constructor should ensure size is present. Unless the constructor is called explicitly with size = None, there should be no problem. In any case, lets put a check to be 100% sure.
https://gerrit.osmocom.org/c/pysim/+/38195/comment/dc4c591c_8901a3cc?usp=ema... : PS1, Line 1043: __get_rec_len
why do we have double-underscores here but single-underscore for _get_size() above? Also: please ad […] I thought I could re-use _get_size() in TransRecEf, that is why _get_size only has one underscore.
https://gerrit.osmocom.org/c/pysim/+/38195/comment/e04af2b8_86fc99d6?usp=ema... : PS1, Line 1266: return b2h(filter_dict(build_construct(self._construct, abstract_data, self._get_size(total_len))))
Did you test that? I think a _get_rec_len() would actually be required here. […] I see, we can not use _get_size here. As far as I understand now I would have to use the rec_len as an alternative value.
I wonder how to test this. As it seems TransRecEF registers the command set from TransparentEF, so I only get the normal update_binary commands. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38195?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1b7a51594fbc5d9fe01132c39354a2fa88d53f9b Gerrit-Change-Number: 38195 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Attention: laforge <laforge@osmocom.org> Gerrit-Comment-Date: Wed, 18 Sep 2024 10:12:35 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge@osmocom.org>
participants (1)
-
dexter