laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/pysim/+/41687?usp=email )

 (

1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
 )Change subject: saip: calculate the number of records for LF and CY
......................................................................

saip: calculate the number of records for LF and CY

Some templates (e.g. for 5GS) define files which aren't completely defined.
5GS OPL5G: doesn't have a file size defined in the template,
but a record size.

Change-Id: I5ec1757d6852eb24d3662ec1c3fc88365e90a616
---
M pySim/esim/saip/__init__.py
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  neels: Looks good to me, approved




diff --git a/pySim/esim/saip/__init__.py b/pySim/esim/saip/__init__.py
index f4ac305..f8a854d 100644
--- a/pySim/esim/saip/__init__.py
+++ b/pySim/esim/saip/__init__.py
@@ -144,6 +144,9 @@
     def file_size(self) -> Optional[int]:
         """Return the size of the file in bytes."""
         if self.file_type in ['LF', 'CY']:
+            if self._file_size and self.nb_rec is None and self.rec_len:
+                self.nb_rec = self._file_size // self.rec_len
+
             return self.nb_rec * self.rec_len
         elif self.file_type in ['TR', 'BT']:
             return self._file_size

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41687?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I5ec1757d6852eb24d3662ec1c3fc88365e90a616
Gerrit-Change-Number: 41687
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: neels <[email protected]>

Reply via email to