scard missing CARD_E_NO_READERS_AVAILABLE definition

Bug #381259 reported by Kjell Tore Fossbakk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyscard (Ubuntu)
Fix Released
Undecided
Ludovic Rousseau

Bug Description

Description: Ubuntu 9.04
Release: 9.04

libpcsclite1:
  Installed: 1.4.102-1ubuntu2
  Candidate: 1.4.102-1ubuntu2
  Version table:
 *** 1.4.102-1ubuntu2 0
        500 http://no.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

I try to use readers in smartcard.System. With no reader connected, I except to be return an empty list.

Instead, I get: NameError: global name 'SCARD_E_NO_READERS_AVAILABLE' is not defined

[kjelle:~/]$ python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from smartcard.System import readers
>>> readers = readers()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/var/lib/python-support/python2.6/smartcard/System.py", line 40, in readers
    return smartcard.pcsc.PCSCReader.readers( groups )
  File "/var/lib/python-support/python2.6/smartcard/pcsc/PCSCReader.py", line 105, in readers
    for reader in __PCSCreaders__( groups ):
  File "/var/lib/python-support/python2.6/smartcard/pcsc/PCSCReader.py", line 46, in __PCSCreaders__
    if hresult==SCARD_E_NO_READERS_AVAILABLE:
NameError: global name 'SCARD_E_NO_READERS_AVAILABLE' is not defined
>>>

The problem seem to be that smartcard/scard/scard.py is missing the SCARD_E_NO_READERS_AVAILABLE declaration!

Revision history for this message
Ludovic Rousseau (ludovic-rousseau-gmail) wrote :

This bug is already corrected in the SVN version of pyscard.

Revision history for this message
Ludovic Rousseau (ludovic-rousseau-gmail) wrote :

reassign bug from pcsc-lite to python-pyscard

affects: pcsc-lite (Ubuntu) → pyscard (Ubuntu)
Revision history for this message
Ludovic Rousseau (ludovic-rousseau-gmail) wrote :

This bug is fixed in version 1.6.8 of the package (not yet in Ubuntu)

Changed in pyscard (Ubuntu):
status: New → Confirmed
Revision history for this message
Ludovic Rousseau (ludovic-rousseau-gmail) wrote :

Lucid (10.04) has version 1.6.8-2. Bug fixed.

Changed in pyscard (Ubuntu):
status: Confirmed → Fix Released
assignee: nobody → Ludovic Rousseau (ludovic-rousseau-gmail)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.