Centralize pycsc windows import hack

git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@222 f711b948-2313-0410-aaa9-d29f33439f0b
This commit is contained in:
hploetz 2007-06-08 00:14:22 +00:00
parent 94fbb4190c
commit d7aa71ca8d
4 changed files with 6 additions and 21 deletions

View File

@ -1,7 +1,8 @@
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
import pycsc, utils, cards, TLV_utils, sys, binascii, time, getopt, traceback
from utils import pycsc
import utils, cards, TLV_utils, sys, binascii, time, getopt, traceback
STATUS_INTERVAL = 10

View File

@ -1,13 +1,4 @@
try:
import pycsc
except ImportError,e:
try:
import PyCSC
from PyCSC import pycsc # Windows
pycsc.SCARD_PROTOCOL_ANY = PyCSC.SCARD_PROTOCOL_ANY
except ImportError:
raise e # raise the original exception, masking the windows-only attempt
from utils import pycsc
import TLV_utils, crypto_utils, utils, binascii, fnmatch, sre
from utils import C_APDU, R_APDU

View File

@ -1,15 +1,7 @@
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
try:
import pycsc
except ImportError,e:
try:
import PyCSC
from PyCSC import pycsc # Windows
pycsc.SCARD_PROTOCOL_ANY = PyCSC.SCARD_PROTOCOL_ANY
except ImportError:
raise e # raise the original exception, masking the windows-only attempt
from utils import pycsc
import crypto_utils, utils, cards, os, re, binascii, sys, exceptions, traceback, getopt, datetime
from shell import Shell

View File

@ -1,7 +1,8 @@
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
import pycsc, utils, cards, TLV_utils, sys, binascii, time, getopt, traceback, re
from utils import pycsc
import utils, cards, TLV_utils, sys, binascii, time, getopt, traceback, re
STATUS_INTERVAL = 10