laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/42739?usp=email )
Change subject: pySim/filesystem: use pySimLogger instead of print
......................................................................
pySim/filesystem: use pySimLogger instead of print
let's replace the stray print statements with proper logger calls.
Related: SYS#6959
Change-Id: I3a7188ad33706df66b2113e15cc7d06004c9bc39
---
M pySim/filesystem.py
1 file changed, 5 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim/filesystem.py b/pySim/filesystem.py
index 95fae36..04806cb 100644
--- a/pySim/filesystem.py
+++ b/pySim/filesystem.py
@@ -44,6 +44,7 @@
from pySim.jsonpath import js_path_modify
from pySim.commands import SimCardCommands
from pySim.exceptions import SwMatchError
+from pySim.log import PySimLogger
# int: a single service is associated with this file
# list: any of the listed services requires this file
@@ -52,6 +53,8 @@
Size = Tuple[int, Optional[int]]
+log = PySimLogger.get(__name__)
+
class CardFile:
"""Base class for all objects in the smart card filesystem.
Serve as a common ancestor to all other file types; rarely used directly.
@@ -1609,14 +1612,14 @@
card_atr = scc.get_atr()
for atr in cls._atrs:
if atr == card_atr:
- print("Detected CardModel:", cls.__name__)
+ log.info("Detected CardModel: %s", cls.__name__)
return True
# if nothing found try to just compare the Historical Bytes of the ATR
card_atr_hb = decomposeATR(card_atr)['hb']
for atr in cls._atrs:
atr_hb = decomposeATR(atr)['hb']
if atr_hb == card_atr_hb:
- print("Detected CardModel:", cls.__name__)
+ log.info("Detected CardModel: %s", cls.__name__)
return True
return False
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42739?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: I3a7188ad33706df66b2113e15cc7d06004c9bc39
Gerrit-Change-Number: 42739
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/42739?usp=email )
Change subject: pySim/filesystem: use pySimLogger instead of print
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42739?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: I3a7188ad33706df66b2113e15cc7d06004c9bc39
Gerrit-Change-Number: 42739
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 13 May 2026 13:17:15 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/42738?usp=email )
Change subject: pySim/app: use pySimLogger instead of print
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42738?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: I95b4536cc8853e7ba6a5dd573b903dfb85e56b9a
Gerrit-Change-Number: 42738
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 13 May 2026 13:17:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/42736?usp=email )
Change subject: card_key_provider: add a static method to parse --column-keys args
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42736?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: Ic955f271b1de1b1b855b21c82ed10343044e45fa
Gerrit-Change-Number: 42736
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 13 May 2026 13:17:09 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/42735?usp=email )
Change subject: card_key_provider: pass CardKeyFieldCryptor to constructor
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42735?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: If43552740aadacab9126f8a002749a9582eef8f4
Gerrit-Change-Number: 42735
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 13 May 2026 13:17:08 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/42741?usp=email )
Change subject: pySim/global_platform: make functionality available outside of cmd2
......................................................................
Patch Set 2: Code-Review-1
(1 comment)
File pySim/global_platform/__init__.py:
https://gerrit.osmocom.org/c/pysim/+/42741/comment/511cc81a_ab412d9f?usp=em… :
PS2, Line 1062: inst_perso_parser = argparse.ArgumentParser()
: inst_perso_parser.add_argument('application_aid', type=is_hexstr, help='Application AID')
:
this doesn't look like it belongs here into the set_status method
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42741?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: Idf4e4b58bf49ba62b2c22de4c49a2dcacfa872cb
Gerrit-Change-Number: 42741
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 13 May 2026 13:16:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: laforge.
dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/42741?usp=email )
Change subject: pySim/global_platform: make functionality available outside of cmd2
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS1:
> I am also not so convinced with the current approach. […]
just noticed that I have a similar problem with the ara-m code. But there I see that that most of the logic is in static methods. Maybe calling static methods that have no dependency to CMD2 is also an option. I am trying it...
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42741?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: Idf4e4b58bf49ba62b2c22de4c49a2dcacfa872cb
Gerrit-Change-Number: 42741
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 12 May 2026 11:07:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42742?usp=email )
Change subject: RemsimServer Tests: give the remsim server some time to update the slotmap
......................................................................
RemsimServer Tests: give the remsim server some time to update the slotmap
The check of the slotmap can race if it is requests straight away,
because the slotmap might be still in the slotmap list as long the
bankd hasn't responded yet.
Change-Id: I6784e05380d844aa4bb9cde2bbe648ff37bee91b
---
M remsim/RemsimServer_Tests.ttcn
1 file changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/42/42742/1
diff --git a/remsim/RemsimServer_Tests.ttcn b/remsim/RemsimServer_Tests.ttcn
index 5850d29..de2c478 100644
--- a/remsim/RemsimServer_Tests.ttcn
+++ b/remsim/RemsimServer_Tests.ttcn
@@ -512,6 +512,9 @@
/* delete the slotmap via REST */
res := f_rsres_delete_slotmap(sm.bank);
+ /* an immediate slotmaps check doesn't work */
+ f_sleep(1.0);
+
/* verify the slotmap is gone */
f_ensure_slotmaps({});
}
@@ -549,6 +552,9 @@
/* delete the slotmap via REST */
res := f_rsres_delete_slotmap(sm.bank);
+ /* an immediate slotmaps check doesn't work */
+ f_sleep(1.0);
+
/* verify the slotmap is gone from REST interface immediately */
f_ensure_slotmaps({});
@@ -600,6 +606,9 @@
/* delete the slotmap via REST */
res := f_rsres_delete_slotmap(sm.bank);
+ /* an immediate slotmaps check doesn't work */
+ f_sleep(1.0);
+
/* verify the slotmap is gone from REST interface immediately */
f_ensure_slotmaps({});
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42742?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I6784e05380d844aa4bb9cde2bbe648ff37bee91b
Gerrit-Change-Number: 42742
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>