Skip to content

Changes

Started by pmaier@sysmocom.de
Started 34 min ago
Queued 0 ms
Took 16 min on built-in
card_key_provider: pass CardKeyFieldCryptor to constructor

We currently create the CardKeyFieldCryptor object inside the constructor
of the concrete CardKeyProvider classes. There is currently no problem
with that, but when we create the CardKeyFieldCryptor object first and
then pass it as parameter to the constructor, we gain more flexibility
in case we want to support other CardKeyFieldCryptor variants in the
future.

Related: SYS#6959
pmaier@sysmocom.de at
card_key_provider: add a static method to parse --column-keys args

The contents of the --column-keys arguments are currently parsed
in init_card_key_provider. Let's add a static method in
CardKeyFieldCryptor to simplify re-usage of the CardKeyFieldCryptor

Related: SYS#6959
pmaier@sysmocom.de at
pySimLogger: fix default log format string

In format string we prepend when we log in verbose mode. We use %(module)s
as format string quaifier. This qualifier is replaced with the name of the
module from where the logger was called. This is mostly equal to the logger
name (__name__) we pass when we create the logger.

However, this is not the behavior we actually want. We want to log the
logger name that we passed when the logger was created. For this, we must
use %(name)s as qualifier.

Related: SYS#6959
pmaier@sysmocom.de at
pySim/app: use pySimLogger instead of print

let's replace the stray print statements with proper logger calls.

Related: SYS#6959
pmaier@sysmocom.de at
pySim/filesystem: use pySimLogger instead of print

let's replace the stray print statements with proper logger calls.

Related: SYS#6959
pmaier@sysmocom.de at
pySim/scp: migrate to pySimLogger

The module scp.py predates the existence of the pySimLogger and still
uses an individually created logger. Let's migrate to pySimLogger to
avoid unexpected effects and to be uniform with the other modules.

Related: SYS#6959
pmaier@sysmocom.de at
pySim/global_platform: make functionality available outside of cmd2

The nested class AddlShellCommands holds methods that encapsulate
the actual functionality from the related do_ method (e.g.
do_store_data calls self.store_data). This is already a good level
of separation but it does not allow us to call those methods from
programs that are not based on cmd2. Let's turn those methods into
functions so that non cmd2 applications have easy access to the
functionality of pySim.global_platform.

Let's also add a pySimLogger, so that we do not have to call
self._cmd.poutput

Related: SYS#6959
pmaier@sysmocom.de at