def _get_key(self, kh, cmd):
        try:
            return self.keys[kh]
        except __HOLE__:
            raise pyhsm.exception.YHSM_CommandFailed(
                pyhsm.defines.cmd2str(cmd),
                pyhsm.defines.YSM_KEY_HANDLE_INVALID)
dataset/ETHPy150Open Yubico/python-pyhsm/pyhsm/soft_hsm.py/SoftYHSM._get_key