Change in pysim[master]: commands: pad short data input in update_record()

dexter gerrit-no-reply at lists.osmocom.org
Fri Apr 30 16:37:49 UTC 2021


Hello Jenkins Builder, 

I'd like you to reexamine a change. Please visit

    https://gerrit.osmocom.org/c/pysim/+/24008

to look at the new patch set (#2).

Change subject: commands: pad short data input in update_record()
......................................................................

commands: pad short data input in update_record()

The method update_record as a "force_len" parameter, which is somewhat
irretatating. Some explainatory comments and a reformat of the if
statement will help to make it more understandable to the api user.

In the non force_len case the method determines the record length from
the select response and throws an exception if the data input does not
match that length. This makes sense if the data input exceeds the
record length of the file but if the data input is less then the record
length the situation is fixable by padding the input with 0xff. This
also a quite common case because in some situation it is not guaranteed
that the data will fill the entire record.

Change-Id: I9a5df0e46c3dd2e87d447c5c01cf15844b0eed07
Related: OS#4963
---
M pySim/commands.py
1 file changed, 12 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/08/24008/2
-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/24008
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I9a5df0e46c3dd2e87d447c5c01cf15844b0eed07
Gerrit-Change-Number: 24008
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210430/f72c13a9/attachment.htm>


More information about the gerrit-log mailing list