mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-22 13:28:33 +03:00
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
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
#
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
from typing import Optional, Union
|
||||
|
||||
@@ -34,6 +33,7 @@ from pySim.utils import h2i, i2h, Hexstr, ResTuple
|
||||
|
||||
class PcscSimLink(LinkBase):
|
||||
""" pySim: PCSC reader transport link."""
|
||||
name = 'PC/SC'
|
||||
|
||||
def __init__(self, opts: argparse.Namespace = argparse.Namespace(pcsc_dev=0), **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
@@ -57,11 +57,6 @@ class PcscSimLink(LinkBase):
|
||||
|
||||
self._con = self._reader.createConnection()
|
||||
|
||||
if os.environ.get('PYSIM_INTEGRATION_TEST') == "1":
|
||||
print("Using PC/SC reader interface")
|
||||
else:
|
||||
print("Using PC/SC reader %s" % self)
|
||||
|
||||
def __del__(self):
|
||||
try:
|
||||
# FIXME: this causes multiple warnings in Python 3.5.3
|
||||
|
||||
Reference in New Issue
Block a user