Closed BoLer1 closed 3 months ago
Describe what you expected should happen.
-> CardRequestTimeoutException should be created and thrown
Describe what did happen.
-> CardRequestTimeoutException throws error on its init
3.8.11 and 3.12.2 are conda manage environments. Both are naked -> Only Base python, pip and pyscard
I appended a simple snipped for reproduction.
from smartcard.CardType import AnyCardType from smartcard.CardRequest import CardRequest from smartcard.Exceptions import CardRequestTimeoutException cardtype = AnyCardType() cardrequest = CardRequest(timeout=1, cardType=cardtype) while (1): try: cardservice = cardrequest.waitforcard() except CardRequestTimeoutException: continue
Traceback:
Traceback (most recent call last): File "blabla\test.py", line 13, in <module> cardservice = cardrequest.waitforcard() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "blabla\Lib\site-packages\smartcard\CardRequest.py", line 68, in waitforcard return self.pcsccardrequest.waitforcard() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "blabla\Lib\site-packages\smartcard\pcsc\PCSCCardRequest.py", line 216, in waitforcard raise CardRequestTimeoutException(hresult=hresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: CardRequestTimeoutException.__init__() got an unexpected keyword argument 'hresult'
The problem should already be fixed in 7711146de5b730978023daa03feb05810d8f0be2
I will make a new release "soon".
Version 2.0.9 is available https://pypi.org/project/pyscard/#files
Your system information
Please describe your issue in as much detail as possible:
Describe what you expected should happen.
-> CardRequestTimeoutException should be created and thrown
Describe what did happen.
-> CardRequestTimeoutException throws error on its init
Steps for reproducing this issue:
3.8.11 and 3.12.2 are conda manage environments. Both are naked -> Only Base python, pip and pyscard
I appended a simple snipped for reproduction.
Traceback: