I'm not able to comment on the Python code, but I was able to apply your patch and it now works on the same lunasa token that has empty slots!!
Module was added successfully, and all keys/certs are generated/imported successfully.

ACK on my part.

thanks for the quick patch.

On 06/24/2015 03:02 PM, Endi Sukma Dewata wrote:
On 6/24/2015 3:27 PM, Endi Sukma Dewata wrote:
Due to issues with HSM the Modutil.is_security_module_registered()
has been modified to the get the list of all registered modules
and then use it to check if a module is registered.


Fixed a typo and a pylint warning.

Pki-devel mailing list