Attention is currently required from: neels.

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

Change subject: personalization: add param_source.py, add batch.py
......................................................................


Patch Set 8:

(3 comments)

File pySim/esim/saip/param_source.py:

https://gerrit.osmocom.org/c/pysim/+/41845/comment/672d4e8e_8c823d30?usp=email :
PS6, Line 121:         val = random.randbytes(self.num_digits // 2) # TODO 
secure random source?
> Done
Ah ok, I understand. The caller can digest hexstrings and bytearrays. I wasn 
not aware of this. To mee it looked a bit off that all get_next methods return 
hexstrings except this one.

However, if it is ok to return either a hexstring or bytes. Then you could also 
add a comment + type annotation to the get_next method in ParamSource.


File pySim/esim/saip/param_source.py:

https://gerrit.osmocom.org/c/pysim/+/41845/comment/7d8fe705_08fed5ad?usp=email :
PS8, Line 116:
I wonder what happens when input_str is something like this: "12..345". Then 
num_digits is 2 but the last_value actually has 3 digits. As you assign 
self.num_digits I guess that you need this value for something later. I would 
recommend to check back if it is ok when self.num_digits is not equal to the 
actual number of digits in self.last_value.


https://gerrit.osmocom.org/c/pysim/+/41845/comment/65c55d8e_d701d5b5?usp=email :
PS8, Line 131:         val = random.randint(*self.val_first_last) # TODO secure 
random source?
The line where you assign self.val_first_last in DecimalRangeSource has been 
removed (this also seems to be the reason why pylint fails). Maybe you can do:

random.randint(self.first_value, self.last_value)



--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41845?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: I01ae40a06605eb205bfb409189fcd2b3a128855a
Gerrit-Change-Number: 41845
Gerrit-PatchSet: 8
Gerrit-Owner: neels <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-CC: dexter <[email protected]>
Gerrit-Attention: neels <[email protected]>
Gerrit-Comment-Date: Wed, 25 Mar 2026 11:46:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <[email protected]>
Comment-In-Reply-To: dexter <[email protected]>

Reply via email to