dexter has uploaded this change for review.
cosmetic: remove excess linebreaks
We should not use double-line breaks to separate things as it is very
difficult to maintain consistence with that scheme.
Change-Id: I2272abcdbba0e57c5118b69bc9398cd909a469b5
---
M pySim-shell.py
M pySim/card_key_provider.py
M pySim/global_platform/__init__.py
M pySim/transport/__init__.py
4 files changed, 0 insertions(+), 11 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/33/42733/1
diff --git a/pySim-shell.py b/pySim-shell.py
index 29ed3a5..bd7d0c0 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -1121,15 +1121,12 @@
fcp_dec = self._cmd.lchan.status()
self._cmd.poutput_json(fcp_dec)
-
class Proact(ProactiveHandler):
def receive_fetch(self, pcmd: ProactiveCommand):
# print its parsed representation
print(pcmd.decoded)
# TODO: implement the basics, such as SMS Sending, ...
-
-
option_parser = argparse.ArgumentParser(description='interactive SIM card shell',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
argparse_add_reader_args(option_parser)
diff --git a/pySim/card_key_provider.py b/pySim/card_key_provider.py
index 06a6b2b..2403694 100644
--- a/pySim/card_key_provider.py
+++ b/pySim/card_key_provider.py
@@ -264,7 +264,6 @@
raise ValueError("provider is not a card data provider")
provider_list.append(provider)
-
def card_key_provider_get(fields: list[str], key: str, value: str, provider_list=card_key_providers) -> Dict[str, str]:
"""Query all registered card data providers for card-individual [key] data.
@@ -289,7 +288,6 @@
raise ValueError("Unable to find card key data (key=%s, value=%s, fields=%s)" % (key, value, str(fields)))
-
def card_key_provider_get_field(field: str, key: str, value: str, provider_list=card_key_providers) -> str:
"""Query all registered card data providers for a single field.
diff --git a/pySim/global_platform/__init__.py b/pySim/global_platform/__init__.py
index 6ff4b28..306746f 100644
--- a/pySim/global_platform/__init__.py
+++ b/pySim/global_platform/__init__.py
@@ -460,7 +460,6 @@
# 11.4.2.1
StatusSubset = Enum(Byte, isd=0x80, applications=0x40, files=0x20, files_and_modules=0x10)
-
# Section 11.4.3.1 Table 11-36
class LifeCycleState(BER_TLV_IE, tag=0x9f70):
_construct = CLifeCycleState
@@ -1010,7 +1009,6 @@
self._cmd.lchan.scc.scp = None
self._cmd.update_prompt()
-
# Card Application of a Security Domain
class CardApplicationSD(CardApplication):
__intermediate = True
@@ -1048,7 +1046,6 @@
return "%s(KVN=%u, ENC=%s, MAC=%s, DEK=%s)" % (self.__class__.__name__,
self.kvn, b2h(self.enc), b2h(self.mac), b2h(self.dek))
-
def compute_kcv_des(key:bytes) -> bytes:
# GP Card Spec B.6: For a DES key, the key check value is computed by encrypting 8 bytes, each with
# value '00', with the key to be checked and retaining the 3 highest-order bytes of the encrypted
diff --git a/pySim/transport/__init__.py b/pySim/transport/__init__.py
index d689a0a..d3cf8d0 100644
--- a/pySim/transport/__init__.py
+++ b/pySim/transport/__init__.py
@@ -25,7 +25,6 @@
from typing import Optional, Tuple
from construct import Construct
from osmocom.utils import b2h, h2b, i2h, Hexstr
-
from pySim.exceptions import *
from pySim.utils import SwHexstr, SwMatchstr, ResTuple, sw_match, parse_command_apdu
from pySim.cat import ProactiveCommand, CommandDetails, DeviceIdentities, Result
@@ -244,7 +243,6 @@
raise SwMatchError(rv[1], sw.lower(), self.sw_interpreter)
return rv
-
class LinkBaseTpdu(LinkBase):
# Use the T=0 TPDU format by default as this is the most commonly used transport protocol.
@@ -373,7 +371,6 @@
return arg_parser
-
def init_reader(opts, **kwargs) -> LinkBase:
"""
Init card reader driver
To view, visit change 42733. To unsubscribe, or for help writing mail filters, visit settings.