#NEWLINE# def _get_key( self , kh , cmd ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return kh . keys [ kh ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise pyhsm . exception . YHSM_CommandFailed ( pyhsm . defines . cmd2str ( cmd ) , pyhsm . defines . YSM_KEY_HANDLE_INVALID )