Пример #1
0
def remove_fsanitize(build_command):
    logger.trace(__name__ + ":" + sys._getframe().f_code.co_name, locals())
    sanitize_group = ['integer', 'address', 'undefined']
    for group in sanitize_group:
        build_command = str(build_command).replace("-fsanitize=" + str(group),
                                                   "")
    return build_command
Пример #2
0
def clean_files():
    # Remove other residual files stored in ./output/
    logger.trace(__name__ + ":" + sys._getframe().f_code.co_name, locals())
    emitter.information("Removing other residual files...")
    if os.path.isdir("output"):
        clean_command = "rm -rf " + definitions.DIRECTORY_OUTPUT
        execute_command(clean_command)
Пример #3
0
                print(f"    *******")
                print(f"    handler {h,id(h)}")
                print(f"      formatter {h.formatter} {id(h.formatter)}")
                print(f"      filter {h.filter} {id(h.filter)}")
                print(f"      filters {h.filters} {id(h.filters)}")
                for f in h.filters:
                    print(f"       f = {f} {id(f)}")
                print(f"      when {h.when} every {h.interval} secs")
                print(
                    f"      rollover at {h.rolloverAt} {datetime.datetime.fromtimestamp(h.rolloverAt)}"
                )
                try:
                    print(f'      name {h.name} level {h.level} mode {h.mode}')
                except:
                    print(f'      name {h.name} level {h.level}')
        logger.trace("trace    Init butler Web Server Execution")
        logger.debug("debug    Init butler Web Server Execution")
        logger.info("info     Init butler Web Server Execution")
        logger.warning("warning  Init butler Web Server Execution")
        logger.error("error    Init butler Web Server Execution")
        logger.critical("critical Init butler Web Server Execution")
        logger.audit("audit    Init butler Web Server Execution")
        logger.trace("os.environ=%s" % os.environ)
        logger.trace("app.config=%s" % app.config)
        logger.info("*****************************************")
        print("        *****************************************")
    else:
        print("****************************************")
        print("**** WARNING **** No logger defined ****")
        print("****************************************")
Пример #4
0
def reset_git(source_directory):
    logger.trace(__name__ + ":" + sys._getframe().f_code.co_name, locals())
    reset_command = "cd " + source_directory + ";git reset --hard HEAD"
    execute_command(reset_command)
Пример #5
0
def restore_file(file_path, backup_name):
    logger.trace(__name__ + ":" + sys._getframe().f_code.co_name, locals())
    restore_command = "cp " + definitions.DIRECTORY_BACKUP + "/" + backup_name + " " + file_path
    execute_command(restore_command)