def getVimhdlInfo(self): """ Gets info about the current project and hdlcc server """ project_file = vim_helpers.getProjectFile() request = RequestHdlccInfo(host=self._host, port=self._port, project_file=project_file) response = request.sendRequest() if response is not None: # The server has responded something, so just print it self._logger.info("Response: %s", str(response.json()['info'])) return "\n".join([ "- %s" % x for x in ["vimhdl version: %s\n" % vimhdl.__version__] + response.json()['info'] ]) else: return "\n".join([ "- %s" % x for x in [ "vimhdl version: %s\n" % vimhdl.__version__, "hdlcc server is not running" ] ])
def getVimhdlInfo(self): "Gets info about the current project and hdlcc server" project_file = vim_helpers.getProjectFile() request = RequestHdlccInfo(host=self._host, port=self._port, project_file=project_file) response = request.sendRequest() if response is None: return "hdlcc server is not running" return "\n".join(["vimhdl version: " + vimhdl.__version__] + ["%s: %s" % (k, v) for k, v in response.json().items()])
def _waitForServerSetup(self): "Wait for ~10s until the server is actually responding" for _ in range(10): time.sleep(0.1) request = RequestHdlccInfo(self._host, self._port) reply = request.sendRequest() self._logger.debug(reply) if reply: self._logger.info("Ok, server is really up") return else: self._logger.info("Server is not responding yet") self._postError("Unable to talk to server")
def _waitForServerSetup(self): """ Wait for ~10s until the server is actually responding """ for _ in range(10): time.sleep(0.2) request = RequestHdlccInfo() response = request.sendRequest() self._logger.debug(response) if response: self._logger.info("Ok, server is really up") return self._logger.info("Server is not responding yet") self._postError("Unable to talk to server")
def getVimhdlInfo(self): """ Gets info about the current project and hdlcc server """ project_file = vim_helpers.getProjectFile() request = RequestHdlccInfo(host=self._host, port=self._port, project_file=project_file) response = request.sendRequest() if response is not None: # The server has responded something, so just print it self._logger.info("Response: %s", str(response.json()['info'])) return "\n".join( ["- %s" % x for x in ["vimhdl version: %s\n" % vimhdl.__version__] + response.json()['info']]) else: return "\n".join( ["- %s" % x for x in ["vimhdl version: %s\n" % vimhdl.__version__, "hdlcc server is not running"]])