Skip to content

user_pin and so_pin in Token.open() are documented as bytes, instead they are str #225

@sherpya

Description

@sherpya

In the docstring of the Token open function user_pin and so_pin are documented as bytes, but the code assumes they are strings:

      elif user_pin is not None:
            pin = user_pin.encode('utf-8')
            c_user_type = user_type if user_type is not None else CKU_USER
        elif so_pin is not None:
            pin = so_pin.encode('utf-8')
            c_user_type = CKU_SO

This causes pycharm (and other type checking tools) to complain

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