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:
parent
94fbb4190c
commit
d7aa71ca8d
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue