Please review the following patch which addresses the following issue:
* PKI TRAC Ticket #1417 - Interactive pkispawn of CA with HSM fails
<
https://fedorahosted.org/pki/ticket/1417>
Note: Code was tested; previous section was commented out to appease
pycharm from reporting unreachable code.