#NEWLINE# def _find_core_protocol( self , name , candidates ) : #NEWLINE# #INDENT# '\n        Return the first procotol in candidates\n        which is supported by this device.\n        ' #NEWLINE# proto = get_proto_cls ( self . protocol_array , candidates ) #NEWLINE# if proto : #NEWLINE# #INDENT# _log . debug ( 'Using %s protocol %s.' , name , name . __name__ ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise DeviceNotSupportedError ( ( 'Device does not implement a known link protocol. capabilities=%s' % self . protocol_array ) ) #NEWLINE# #UNINDENT# return proto ( )