Esempio n. 1
0
def recompile(conffile, only_client, only_server):
    errorcode = 0
    try:
        commands = Commands(conffile, verify=True)

        # client or server
        process_client = True
        process_server = True
        if only_client and not only_server:
            process_server = False
        if only_server and not only_client:
            process_client = False

        if process_client:
            try:
                recompile_side(commands, CLIENT)
            except CalledProcessError:
                errorcode = 2
                pass
        if process_server:
            try:
                recompile_side(commands, SERVER)
            except CalledProcessError:
                errorcode = 3
                pass
    except Exception:  # pylint: disable-msg=W0703
        logging.exception('FATAL ERROR')
        sys.exit(1)
    sys.exit(errorcode)
Esempio n. 2
0
def recompile(conffile, only_client, only_server):
    errorcode = 0
    try:
        commands = Commands(conffile, verify=True)

        # client or server
        process_client = True
        process_server = True
        if only_client and not only_server:
            process_server = False
        if only_server and not only_client:
            process_client = False

        if process_client:
            try:
                recompile_side(commands, CLIENT)
            except CalledProcessError:
                errorcode = 2
                pass
        if process_server:
            try:
                recompile_side(commands, SERVER)
            except CalledProcessError:
                errorcode = 3
                pass
    except Exception:  # pylint: disable-msg=W0703
        logging.exception('FATAL ERROR')
        sys.exit(1)
    sys.exit(errorcode)
Esempio n. 3
0
def recompile(conffile):
    try:
        commands = Commands(conffile, verify=True)

        try:
            recompile_side(commands, CLIENT)
        except CalledProcessError:
            pass
        try:
            recompile_side(commands, SERVER)
        except CalledProcessError:
            pass
    except Exception:  # pylint: disable-msg=W0703
        logging.exception('FATAL ERROR')
        sys.exit(1)
Esempio n. 4
0
def recompile(conffile):
    try:
        commands = Commands(conffile, verify=True)

        try:
            recompile_side(commands, CLIENT)
        except CalledProcessError:
            pass
        try:
            recompile_side(commands, SERVER)
        except CalledProcessError:
            pass
    except Exception:  # pylint: disable-msg=W0703
        logging.exception('FATAL ERROR')
        sys.exit(1)