def file_found ( filename , force ) : if os . path . exists ( filename ) and not force : logger . info ( "Found %s; skipping..." % filename ) return True else : return False
how to skip if a file doesnt exist in python
Check if a file exists
def file_found(filename,force):
    """Check if a file exists"""
    if os.path.exists(filename) and not force:
        logger.info("Found %s; skipping..."%filename)
        return True
    else:
        return False