Attention is currently required from: laforge.

neels has posted comments on this change by neels. ( 
https://gerrit.osmocom.org/c/pysim/+/43866?usp=email )

Change subject: personalization: SUCI: ff-pad remaining file size
......................................................................


Patch Set 1:

(1 comment)

File pySim/esim/saip/personalization.py:

https://gerrit.osmocom.org/c/pysim/+/43866/comment/b3200b93_833ea8d6?usp=email :
PS1, Line 1340:             is_size = f_sucici.file_size
              :             pad_n = is_size - len(body)
              :             if pad_n > 0:
              :                 body = body + b'\xff' * pad_n
> I'm rather certain we have implemented ff-padding a number of times in pysim 
> and/or pyosmocom alread […]
rpad() can be used, except that its type annotations say 'str'.

grepping around for 'pad', i only find utf-8 strings used to pad data, intead 
of just using bytes. Hence the rpad() is documented and annotated for utf-8 
strings, even though it works generally for any iterable.

I will thus use the external dependency rpad(), ignoring the type annotations,
and maybe submit a patch to remove the type annotations from rpad() and lpad() 
in pyosmocom.



--
To view, visit https://gerrit.osmocom.org/c/pysim/+/43866?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: I9465eac9269e3f76dddd467109f547489a0feb93
Gerrit-Change-Number: 43866
Gerrit-PatchSet: 1
Gerrit-Owner: neels <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <[email protected]>
Gerrit-Attention: laforge <[email protected]>
Gerrit-Comment-Date: Wed, 28 Oct 2026 00:07:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <[email protected]>

Reply via email to