flowcraft/generator/report.py
def _close_connection(self, report_id):
        """Sends a delete request for the report JSON hash

        Parameters
        ----------
        report_id : str
            Hash of the report JSON as retrieved from :func:`~_get_report_hash`
        """

        logger.debug(
            "Closing connection and sending DELETE request to {}".format(
                self.broadcast_address))

        try:
            r = requests.delete(self.broadcast_address,
                                json={"run_id": report_id})
            if r.status_code != 202:
                logger.error(colored_print(
                    "ERROR: There was a problem sending data to the server"
                    "with reason: {}".format(r.reason)))
        except requests.exceptions.ConnectionError:
            logger.error(colored_print(
                "ERROR: Could not establish connection with server. The server"
                " may be down or there is a problem with your internet "
                "connection.", "red_bold"))
            sys.exit(1)
def _close_connection(self, report_id):
        logger.debug(
            "Closing connection and sending DELETE request to {}".format(
                self.broadcast_address))

        try:
            r = requests.delete(self.broadcast_address,
                                json={"run_id": report_id})
            if r.status_code != 202:
                logger.error(colored_print(
                    "ERROR: There was a problem sending data to the server"
                    "with reason: {}".format(r.reason)))
        except requests.exceptions.ConnectionError:
            logger.error(colored_print(
                "ERROR: Could not establish connection with server. The server"
                " may be down or there is a problem with your internet "
                "connection.", "red_bold"))
            sys.exit(1)
def _close_connection ( self , report_id ) : logger . debug ( "Closing connection and sending DELETE request to {}" . format ( self . broadcast_address ) ) try : r = requests . delete ( self . broadcast_address , json = { "run_id" : report_id } ) if r . status_code != 202 : logger . error ( colored_print ( "ERROR: There was a problem sending data to the server" "with reason: {}" . format ( r . reason ) ) ) except requests . exceptions . ConnectionError : logger . error ( colored_print ( "ERROR: Could not establish connection with server. The server" " may be down or there is a problem with your internet " "connection." , "red_bold" ) ) sys . exit ( 1 )
Sends a delete request for the report JSON hash

        Parameters
        ----------
        report_id : str
            Hash of the report JSON as retrieved from :func:`~_get_report_hash`
Sends a delete request for the report JSON hash