dexter has uploaded this change for review. ( 
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(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/39/42739/1

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: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I3a7188ad33706df66b2113e15cc7d06004c9bc39
Gerrit-Change-Number: 42739
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <[email protected]>

Reply via email to