Skip to content

AlreadyInitilized reports new library instead of previous #193

@msetina

Description

@msetina
def lib(so):
    """
    Wrap the main library call coming from Cython with a preemptive
    dynamic loading.
    """
    global _lib
    global _so

    if _lib:
        if _so != so:
            raise AlreadyInitialized(  # noqa: F405
-                "Already initialized with %s" % so)
+                "Already initialized with %s" % _so)
        else:
            return _lib

    from . import _pkcs11

    _lib = _pkcs11.lib(so)
    _so = so

    return _lib

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions