stresstest.py
def iter_logs(iterable, missing_ok=False):
    """ Generator to extract log entries from shared log file. """
    for fn in iterable:
        opener = open
        log_path = fn
        log_path_gz = log_path + ".gz"
        if os.path.exists(log_path_gz):
            log_path = log_path_gz
            opener = gzip.open

        if os.path.exists(log_path):
            with opener(log_path, "rb") as fh:
                for line in fh:
                    yield line
        elif not missing_ok:
            raise ValueError("Missing log file %s" % log_path)
 Generator to extract log entries from shared log file. 
Generator to extract log entries from shared log file.
Generator to extract log entries from shared log file .
def iter_logs(iterable, missing_ok=False):
    for fn in iterable:
        opener = open
        log_path = fn
        log_path_gz = log_path + ".gz"
        if os.path.exists(log_path_gz):
            log_path = log_path_gz
            opener = gzip.open
        if os.path.exists(log_path):
            with opener(log_path, "rb") as fh:
                for line in fh:
                    yield line
        elif not missing_ok:
            raise ValueError("Missing log file %s" % log_path)
def iter_logs ( iterable , missing_ok = False ) : for fn in iterable : opener = open log_path = fn log_path_gz = log_path + ".gz" if os . path . exists ( log_path_gz ) : log_path = log_path_gz opener = gzip . open if os . path . exists ( log_path ) : with opener ( log_path , "rb" ) as fh : for line in fh : yield line elif not missing_ok : raise ValueError ( "Missing log file %s" % log_path )
Generator to extract log entries from shared log file.
Generator to extract log entries from shared log file .
""" Generator to extract log entries from shared log file. """
iterable
missing_ok