From e9eb486fae220903f039ffae5125894c1e156aa4 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Sat, 12 Sep 2015 18:12:05 -0400 Subject: Move YAML parsing to external script so py11 doesn't have to worry about finding attributes.yaml at runtime. --- py11/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'py11/__init__.py') 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) -- cgit v1.2.3