def send(self, load, tries=None, timeout=None, raw=False):  # pylint: disable=unused-argument
        '''
        Emulate the channel send method, the tries and timeout are not used
        '''
        if 'cmd' not in load:
            log.error('Malformed request, no cmd: %s', load)
            return {}
        cmd = load['cmd'].lstrip('_')
        if cmd in self.cmd_stub:
            return self.cmd_stub[cmd]
        if not hasattr(self.fs, cmd):
            log.error('Malformed request, invalid cmd: %s', load)
            return {}
        return getattr(self.fs, cmd)(load)
def send ( self , load , tries = None , timeout = None , raw = False ) : if 'cmd' not in load : log . error ( 'Malformed request, no cmd: %s' , load ) return { } cmd = load [ 'cmd' ] . lstrip ( '_' ) if cmd in self . cmd_stub : return self . cmd_stub [ cmd ] if not hasattr ( self . fs , cmd ) : log . error ( 'Malformed request, invalid cmd: %s' , load ) return { } return getattr ( self . fs , cmd ) ( load )
Emulate the channel send method, the tries and timeout are not used