def cleanup(): conf = lazy_conf(None) for fn in include_files_unused(conf): fn = os.path.join(conf.paths.source, fn[1:]) if os.path.exists(fn): os.remove(fn) logger.info("removed {0}, which was an unused include file.".format(fn)) else: logger.error('{0} does not exist'.format(fn))
def cleanup(): conf = lazy_conf() for fn in include_files_unused(conf=conf): fn = os.path.join(conf.paths.source, fn[1:]) if os.path.exists(fn): os.remove(fn) logger.info( "removed {0}, which was an unused include file.".format(fn)) else: logger.error('{0} does not exist'.format(fn))
def unused(): "Returns a list of included files that are never used." render_for_console(include_files_unused())
def unused(): "Returns a list of included files that are never used." conf = lazy_conf() render_for_console(include_files_unused(conf=conf))