def _receive_poll(self, command_id, response_streams):
logging.info('<STR_LIT>' + command_id)<EOL>resource = ResourceLocator(CommandShell.ShellResource)<EOL>resource.add_selector('<STR_LIT>', self.__shell_id)<EOL>stream_attributes = {'<STR_LIT>': "<STR_LIT:U+0020>".join(response_streams.keys()), '<STR_LIT>': command_id}<EOL>receive = {'<STR_LIT>': {'<STR_LIT>': stream_attributes}}<EOL>try:<EOL><INDENT>response = self.session.recieve(resource, receive)['<STR_LIT>']<EOL><DEDENT>except Exception as e:<EOL><INDENT>return False, None<EOL><DEDENT>session_streams = response.get('<STR_LIT>', ())<EOL>if not isinstance(session_streams, list):<EOL><INDENT>session_streams = [session_streams]<EOL><DEDENT>for stream in session_streams:<EOL><INDENT>if stream['<STR_LIT>'] == command_id and '<STR_LIT>' in stream:<EOL><INDENT>response_streams[stream['<STR_LIT>']] += base64.b64decode(stream['<STR_LIT>'])<EOL><DEDENT><DEDENT>done = response['<STR_LIT>']['<STR_LIT>'] == CommandShell.StateDone<EOL>if done:<EOL><INDENT>exit_code = int(response['<STR_LIT>']['<STR_LIT>'])<EOL><DEDENT>else: exit_code = None<EOL>return done, exit_code<EOL>
Recieves data
:param command_id:
:param streams:
:return: