LudovicRousseau / pyscard

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

Exception ListReadersException: ('Failed to list readers', 2148532253) spam after pcscd service stop. #23

Closed valdur55 closed 8 years ago

valdur55 commented 8 years ago

Hi, As using http://pyscard.sourceforge.net/user-guide.html#monitoring-smart-cards and sending machine to reboot causes traceback spam in terminal. After pcscd service stop, app will spam same traceback message endlessy or until app closes.

In other hand, http://pyscard.sourceforge.net/user-guide.html#monitoring-readers will give only one traceback and not more.

Digging into code gives answer for problem: It will spam forever: https://github.com/LudovicRousseau/pyscard/blob/defecae038d55cba4431c8e6ba68a843568ce1a9/smartcard/CardMonitoring.py#L191

It gives one traceback: https://github.com/LudovicRousseau/pyscard/blob/defecae038d55cba4431c8e6ba68a843568ce1a9/smartcard/ReaderMonitoring.py#L194

Simple fix for problem: #22

LudovicRousseau commented 8 years ago

22 merged

Thanks