aboutsummaryrefslogtreecommitdiff
path: root/py11/__init__.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-09-12 18:12:05 -0400
committerRob Austein <sra@hactrn.net>2015-09-12 18:12:05 -0400
commite9eb486fae220903f039ffae5125894c1e156aa4 (patch)
tree8b866f5bd0cc7342fcbb406af604967113db2058 /py11/__init__.py
parentd4dd9a8becf0c8f28479f0e48cc7f6708f786ee4 (diff)
Move YAML parsing to external script so py11 doesn't have to worry
about finding attributes.yaml at runtime.
Diffstat (limited to 'py11/__init__.py')
-rw-r--r--py11/__init__.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/py11/__init__.py b/py11/__init__.py
index b67ce8a..da0c946 100644
--- a/py11/__init__.py
+++ b/py11/__init__.py
@@ -1,7 +1,6 @@
# An attempt at a Python interface to PKCS 11 using the scary ctypes
# module from the Python standard library.
-from struct import pack, unpack
from ctypes import *
from .exceptions import *
from .types import *
@@ -12,7 +11,7 @@ from .prototypes import *
class PKCS11 (object):
- def __init__(self, so_name = "libpkcs11.so", attributes_initializer = "attributes.yaml"):
+ def __init__(self, so_name = "libpkcs11.so"):
self.so_name = so_name
self.so = CDLL(so_name)
def raise_on_failure(rv):
@@ -22,7 +21,7 @@ class PKCS11 (object):
func = getattr(self.so, name)
func.restype = raise_on_failure
func.argtypes = args
- self.adb = AttributeDB(attributes_initializer)
+ self.adb = AttributeDB()
def __getattr__(self, name):
return getattr(self.so, name)