mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-16 18:38:32 +03:00
ts_31_102: Fix initialization of file size
We were using positional arguments when instantiating instances
of classes like EF_5GS3GPPLOCI with non-default names/fids/...
However, we got the argument order wrong and were passing the
description string in the position of the file size, which causes
exceptions like the following from pySim-trace:
Traceback (most recent call last):
File "/home/laforge/projects/git/pysim/./pySim-trace.py", line 198, in <module>
tracer.main()
File "/home/laforge/projects/git/pysim/./pySim-trace.py", line 125, in main
inst.process(self.rs)
File "/home/laforge/projects/git/pysim/pySim/apdu/__init__.py", line 259, in process
self.processed = method(self.lchan)
File "/home/laforge/projects/git/pysim/pySim/apdu/ts_102_221.py", line 152, in process_on_lchan
if self.cmd_dict['offset'] != 0 or self.lr < self.file.size[0]:
TypeError: '<' not supported between instances of 'int' and 'str'
Let's use named initializers for any arguments after the usual "fid, sfid, name"
initial arguments.
Change-Id: I7f32c9fd01094620b68b0e54536ecc6cdbe67903
This commit is contained in:
@@ -1331,10 +1331,10 @@ class DF_USIM_5GS(CardDF):
|
||||
# I'm looking at 31.102 R16.6
|
||||
EF_5GS3GPPLOCI(service=122),
|
||||
EF_5GS3GPPLOCI('4f02', 0x02, 'EF.5GSN3GPPLOCI',
|
||||
'5GS non-3GPP location information', service=122),
|
||||
desc='5GS non-3GPP location information', service=122),
|
||||
EF_5GS3GPPNSC(service=122),
|
||||
EF_5GS3GPPNSC('4f04', 0x04, 'EF.5GSN3GPPNSC',
|
||||
'5GS non-3GPP Access NAS Security Context', service=122),
|
||||
desc='5GS non-3GPP Access NAS Security Context', service=122),
|
||||
EF_5GAUTHKEYS(service=123),
|
||||
EF_UAC_AIC(service=126),
|
||||
EF_SUCI_Calc_Info(service=124),
|
||||
@@ -1342,7 +1342,7 @@ class DF_USIM_5GS(CardDF):
|
||||
EF_SUPI_NAI(service=130),
|
||||
EF_Routing_Indicator(service=124),
|
||||
TransparentEF('4F0B', 0x0b, 'EF.URSP',
|
||||
'UE Route Selector Policies per PLMN', service=132),
|
||||
desc='UE Route Selector Policies per PLMN', service=132),
|
||||
EF_TN3GPPSNN(service=133),
|
||||
# Rel-17 additions below
|
||||
EF_CAG(service=137),
|
||||
|
||||
Reference in New Issue
Block a user