pySim-prog: Fix pcsc device selection and link creation

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
Sylvain Munaut 2010-12-08 23:20:27 +01:00
parent 245d534962
commit 9c8729a2d1
1 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ def parse_options():
help="Baudrate used for SIM access [default: %default]",
default=9600,
)
parser.add_option("-p", "--pcsc-device", dest="pcsc_dev", metavar="PCSC",
parser.add_option("-p", "--pcsc-device", dest="pcsc_dev", type='int', metavar="PCSC",
help="Which PC/SC reader number for SIM access",
default=None,
)
@ -299,7 +299,7 @@ if __name__ == '__main__':
sl = SerialSimLink(device=opts.device, baudrate=opts.baudrate)
else:
from pySim.transport.pcsc import PcscSimLink
sl = PcscSimLink(0, observer=0)
sl = PcscSimLink(opts.pcsc_dev)
scc = SimCardCommands(transport=sl)
# Detect type if needed