transport: Move printing of reader number/name to generic code
Let's avoid copy+pasting print statements everywhere. The instances
do already have a __str__ method for the purpose of printing their name in a
generic way.
Change-Id: I663a9ea69bf7e7aaa6502896b6a71ef692f8d844
diff --git a/pySim/transport/calypso.py b/pySim/transport/calypso.py
index 01bbe23..dd30f80 100644
--- a/pySim/transport/calypso.py
+++ b/pySim/transport/calypso.py
@@ -76,14 +76,11 @@
class CalypsoSimLink(LinkBase):
"""Transport Link for Calypso based phones."""
+ name = 'Calypso-based (OsmocomBB) reader'
def __init__(self, opts: argparse.Namespace = argparse.Namespace(osmocon_sock="/tmp/osmocom_l2"), **kwargs):
sock_path = opts.osmocon_sock
super().__init__(**kwargs)
- if os.environ.get('PYSIM_INTEGRATION_TEST') == "1":
- print("Using Calypso-based (OsmocomBB) reader interface")
- else:
- print("Using Calypso-based (OsmocomBB) reader at socket %s" % sock_path)
# Make sure that a given socket path exists
if not os.path.exists(sock_path):
raise ReaderError(