

def status(self, query='c:\n', agent=None):
    'See :func:`burpui.misc.backend.interface.BUIbackend.status`'
    try:
        self._logger('info', "query: '{}'".format(query.rstrip()))
        if (not query.endswith('\n')):
            query = '{0}\n'.format(query)
        if (not self._proc_is_alive()):
            w._spawn_burp()
        (_, w, _) = select([], [self.proc.stdin], [], self.timeout)
        if (self.proc.stdin not in w):
            raise TimeoutError('Write operation timed out')
        self.proc.stdin.write(query)
        js = self._read_proc_stdout()
        if self._is_warning(js):
            self._logger('warning', js['warning'])
            self._logger('debug', 'Nothing interesting to return')
            return None
        self._logger('debug', '=> {}'.format(js))
        return js
    except TimeoutError as e:
        msg = 'Cannot send command: {}'.format(str(e))
        self._logger('error', msg)
        self._kill_burp()
        raise BUIserverException(msg)
    except (OSError, Exception) as e:
        msg = 'Cannot launch burp process: {}'.format(str(e))
        self._logger('error', msg)
        raise BUIserverException(msg)

dataset/ETHPy150Open ziirish/burp-ui/burpui/misc/backend/burp2.py Burp.status/VarMisuse@77/124 `self`->`w`