Пример #1
0
    def _check_call_api(self, uri, data=None):
        cmd.load_config(self.config_obj)
        status, content = cmd.request(self.tron_server_uri, uri, data=data)

        if status != cmd.OK or not content:
            raise TronSandboxException("Error connecting to tron server at %s%s" % (self.tron_server_uri, uri))

        return content
Пример #2
0
    def _check_call_api(self, uri, data=None):
        cmd.load_config(self.config_obj)
        status, content = cmd.request(self.tron_server_uri, uri, data=data)

        if status != cmd.OK or not content:
            log.warning('trond appears to have crashed. Log:')
            log.warning(self.log_contents())
            raise TronSandboxException("Error connecting to tron server at %s%s" % (self.tron_server_uri, uri))

        return content