def parse_result(self, data):
        # typedef struct {
        #   YSM_STATUS status;                  // Unlock status
        # } YSM_KEY_STORAGE_UNLOCK_RESP;
        fmt = "B"
        self.status, = struct.unpack(fmt, data)

        if self.status == pyhsm.defines.YSM_STATUS_OK:
            return True
        else:
            raise pyhsm.exception.YHSM_CommandFailed(pyhsm.defines.cmd2str(self.command), self.status)
Parse result of L{pyhsm.defines.YSM_KEY_STORAGE_UNLOCK} command.
dataset/ETHPy150Open Yubico/python-pyhsm/pyhsm/basic_cmd.py/YHSM_Cmd_Key_Storage_Unlock.parse_result