Merge branch 'master' of https://github.com/ledgerhq/blue-loader-python
j
This commit is contained in:
commit
dcf012d862
|
@ -43,7 +43,7 @@ class Dongle(object):
|
||||||
__metaclass__ = ABCMeta
|
__metaclass__ = ABCMeta
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def exchange(self, apdu, timeout=20000):
|
def exchange(self, apdu, timeout=20):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
|
@ -62,7 +62,7 @@ class HIDDongleHIDAPI(Dongle, DongleWait):
|
||||||
self.waitImpl = self
|
self.waitImpl = self
|
||||||
self.opened = True
|
self.opened = True
|
||||||
|
|
||||||
def exchange(self, apdu, timeout=20000):
|
def exchange(self, apdu, timeout=20):
|
||||||
if self.debug:
|
if self.debug:
|
||||||
print "=> %s" % hexlify(apdu)
|
print "=> %s" % hexlify(apdu)
|
||||||
if self.ledger:
|
if self.ledger:
|
||||||
|
@ -146,7 +146,7 @@ class DongleSmartcard(Dongle):
|
||||||
self.waitImpl = self
|
self.waitImpl = self
|
||||||
self.opened = True
|
self.opened = True
|
||||||
|
|
||||||
def exchange(self, apdu, timeout=20000):
|
def exchange(self, apdu, timeout=20):
|
||||||
if self.debug:
|
if self.debug:
|
||||||
print "=> %s" % hexlify(apdu)
|
print "=> %s" % hexlify(apdu)
|
||||||
response, sw1, sw2 = self.device.transmit(toBytes(hexlify(apdu)))
|
response, sw1, sw2 = self.device.transmit(toBytes(hexlify(apdu)))
|
||||||
|
|
Loading…
Reference in New Issue