laforge submitted this change.
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(-)
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 change 42739. To unsubscribe, or for help writing mail filters, visit settings.