Attention is currently required from: dexter.

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

Change subject: personalization: implement reading back values from a PES
......................................................................


Patch Set 11:

(4 comments)

File pySim/esim/saip/personalization.py:

https://gerrit.osmocom.org/c/pysim/+/40198/comment/0f6ea6c7_7c4edfa6?usp=email :
PS11, Line 209:     def get_values_from_pes(cls, pes: ProfileElementSequence) 
-> Generator:
> As far as I understand ''' just marks a multiline comment, but shouldn't this 
> be a doctstring?
if you mean the triple single quotes -- AFAIK *any* string format in this 
location is a docstring. Though laforge has indicated that i sould follow the 
triple double quote convention.


https://gerrit.osmocom.org/c/pysim/+/40198/comment/077471e9_e2401188?usp=email :
PS11, Line 290:     def decimal_hex_to_str(cls, val):
> also have not seen single quotes as comment chars before...
Done


https://gerrit.osmocom.org/c/pysim/+/40198/comment/a27f69de_37436e9b?usp=email :
PS11, Line 292:         if isinstance(val, bytes):
> Is it always ensured that we won't get sometimes bytes and sometimes 
> bytearrays?
the values are coming from a ProfileElementSequence's decoded section, should 
always be either a hexstr or bytes. ok?


https://gerrit.osmocom.org/c/pysim/+/40198/comment/8184e5b7_69812655?usp=email :
PS11, Line 297:             val = unrpad(val, c)
> You are sure that you want to turn val to ascii, like "4141" => "AA"? (am a 
> bit confused since the m […]
I got this code from elsewhere (or reversing code from elsewhere?)
and I am positively sure that it works as intended.

this is how PIN and PUK are stored, apparently actually the ascii codes of the 
PIN/PUK digits. The function makes a PIN/PUK human readable.

The only reason to not directly do a .decode('ascii') is apparently the rpad / 
unrpad.



-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/40198?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: I234fc4317f0bdc1a486f0cee4fa432c1dce9b463
Gerrit-Change-Number: 40198
Gerrit-PatchSet: 11
Gerrit-Owner: neels <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Attention: dexter <[email protected]>
Gerrit-Comment-Date: Sun, 15 Mar 2026 22:40:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: dexter <[email protected]>

Reply via email to