aboutsummaryrefslogtreecommitdiff
path: root/cryptech/py11/__init__.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2020-05-25 19:33:47 -0400
committerRob Austein <sra@hactrn.net>2020-05-25 19:33:47 -0400
commitfa3feddf3a25e34db2ac57ff8e962f13db07bf40 (patch)
treec001ead2bc727824ad26a1f5493c491eefe77185 /cryptech/py11/__init__.py
parent5936befa654ce79b2f9ee7cd4f3beb6489bac227 (diff)
Untested conversion to support Python 3
Diffstat (limited to 'cryptech/py11/__init__.py')
-rw-r--r--cryptech/py11/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cryptech/py11/__init__.py b/cryptech/py11/__init__.py
index 1618a76..740ecb6 100644
--- a/cryptech/py11/__init__.py
+++ b/cryptech/py11/__init__.py
@@ -125,7 +125,7 @@ class PKCS11 (object):
self.d.C_GetSlotList(CK_TRUE, None, byref(count))
slots = (CK_SLOT_ID * count.value)()
self.d.C_GetSlotList(CK_TRUE, slots, byref(count))
- return tuple(slots[i] for i in xrange(count.value))
+ return tuple(slots[i] for i in range(count.value))
def C_GetTokenInfo(self, slot_id):
token_info = CK_TOKEN_INFO()
@@ -169,7 +169,7 @@ class PKCS11 (object):
count = CK_ULONG(1)
while count.value > 0:
self.d.C_FindObjects(session, objects, len(objects), byref(count))
- for i in xrange(count.value):
+ for i in range(count.value):
yield objects[i]
def FindObjects(self, session, template = None, **kwargs):