LudovicRousseau / pyscard

pyscard smartcard library for python
http://pyscard.sourceforge.net/
GNU Lesser General Public License v2.1
379 stars 108 forks source link

no reconnect method for CardConnection #107

Closed ElouanPetereau closed 3 years ago

ElouanPetereau commented 3 years ago

Hello,

I was wondering why no reconnect method was available for CardConnection().

After I gave a look at the winscard.h API It seems that the behaviour of reconnect is not the same as doing a disconnect/connect so I can't do that using the disconnect then the connect methods of the higher level Python framework. Of course I can do a Reconnect using the wrapping of the WinSCard API but it would be easier if it was implemented in CardConnection().

Is there a reason why this method is not present or is it just that it wasn't requested/used by anyone?

LudovicRousseau commented 3 years ago

It was never requested. Feel free to propose a patch.

LudovicRousseau commented 3 years ago

Fixed in https://github.com/LudovicRousseau/pyscard/commit/a4a030587e316427b1487eb08da2773e478d95fc