Esempio n. 1
0
    def error(message, *args):
        """Display an error message, prefixed with the plug-in name.

        :param str message: the message to log
        :param list[*] args: arguments of the `message` format string
        """
        Console.error(message % args, prefix=MODULE)
Esempio n. 2
0
    def error(message, *args):
        """Display an error message, prefixed with the plug-in name.

        :param str message: the message to log
        :param list[*] args: arguments of the `message` format string
        """
        Console.error(message % args, prefix=MODULE)
Esempio n. 3
0
    def error(self, message):
        """Display an error message.

        :param str message: the message to display
        """
        Console.error(message, prefix=SonarScannerProperties.CONSOLE_NAME)
Esempio n. 4
0
LOG = logging.getLogger(MODULE)

# Define default path to server.py script
DEFAULT_SCRIPT_PATH = GNAThub.engine_repository()
SCRIPT_NAME = 'server.py'

# Default port value
DEFAULT_PORT = 8080

# Determine script path and check is different of default value
script_path = DEFAULT_SCRIPT_PATH
#  TO DO : Add handling when path is given via --server-dir

if not os.path.exists(script_path):
    repo_msg = script_path + ' repository does not exist'
    Console.error(repo_msg, prefix=MODULE)

else:
    msg = 'load script from ' + script_path + ' repository'
    Console.info(msg, prefix=MODULE)

    # Build server script full path
    server_script_path = os.path.join(script_path, SCRIPT_NAME)
    if os.path.exists(server_script_path):
        if os.path.isfile(server_script_path):
            try:
                port = DEFAULT_PORT
                if GNAThub.port():
                    port = GNAThub.port()
                msg_exec = 'execute ' + SCRIPT_NAME
                msg_exec = msg_exec + ' (PORT NUMBER: ' + str(port) + ')'
Esempio n. 5
0
LOG = logging.getLogger(MODULE)

# Define default path to server.py script
DEFAULT_SCRIPT_PATH = GNAThub.engine_repository()
SCRIPT_NAME = 'server.py'

# Default port value
DEFAULT_PORT = 8080

# Determine script path and check is different of default value
script_path = DEFAULT_SCRIPT_PATH
#  TO DO : Add handling when path is given via --server-dir

if not os.path.exists(script_path):
    repo_msg = script_path + ' repository does not exist'
    Console.error(repo_msg, prefix=MODULE)

else:
    msg = 'load script from ' + script_path + ' repository'
    Console.info(msg, prefix=MODULE)

    # Build server script full path
    server_script_path = os.path.join(script_path, SCRIPT_NAME)
    if os.path.exists(server_script_path):
        if os.path.isfile(server_script_path):
            try:
                port = DEFAULT_PORT
                if GNAThub.port():
                    port = GNAThub.port()

                msg_exec = 'execute ' + SCRIPT_NAME