LudovicRousseau / pyscard

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

Add context management for CardConnection. #24

Closed rockwelln closed 8 years ago

rockwelln commented 8 years ago

A context manager to handle the card connection in a proper way. It makes sure, the function disconnect is called when the context is exited.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.04%) to 23.974% when pulling c7e6884e2570be9c6c4539ccf2eeaa954bcd39f6 on NormanDenayer:features/connection_context into 30a1ab034acc1e33c4ec67d92e8f6c254a54e1e9 on LudovicRousseau:master.

LudovicRousseau commented 8 years ago

That is a very good idea. I would like to add documentation and test code for this new feature. If you can help that would be fine and speed up the merge.

LudovicRousseau commented 8 years ago

fixed in https://github.com/LudovicRousseau/pyscard/commit/fb276f8a35d0e231699c9f38da2685daa0a4917c Thanks

rockwelln commented 8 years ago

Sorry I didn't had the time yet to update the doc and the tests as you mentioned. (I keep it in mind anyway)