ATR: align get_atr() return value type
type annotations claimed the return type was Hexstr, but in reality it was a list of integers. Let's fix that. Change-Id: I01b247dad40ec986cf199302f8e92d16848bd499 Closes: OS#6322
This commit is contained in:
committed by
Philipp Maier
parent
d871e4696f
commit
08ba187fd4
@@ -103,7 +103,7 @@ class PcscSimLink(LinkBaseTpdu):
|
||||
raise NoCardError() from exc
|
||||
|
||||
def get_atr(self) -> Hexstr:
|
||||
return self._con.getATR()
|
||||
return i2h(self._con.getATR())
|
||||
|
||||
def disconnect(self):
|
||||
self._con.disconnect()
|
||||
|
||||
@@ -21,7 +21,7 @@ import os
|
||||
import argparse
|
||||
from typing import Optional
|
||||
import serial
|
||||
from osmocom.utils import h2b, b2h, Hexstr
|
||||
from osmocom.utils import h2b, b2h, i2h, Hexstr
|
||||
|
||||
from pySim.exceptions import NoCardError, ProtocolError
|
||||
from pySim.transport import LinkBaseTpdu
|
||||
@@ -96,7 +96,7 @@ class SerialSimLink(LinkBaseTpdu):
|
||||
self.reset_card()
|
||||
|
||||
def get_atr(self) -> Hexstr:
|
||||
return self._atr
|
||||
return i2h(self._atr)
|
||||
|
||||
def disconnect(self):
|
||||
pass # Nothing to do really ...
|
||||
|
||||
Reference in New Issue
Block a user