scripts/analyze_logs.py
def logs_file_path(cmdl_args):
    """Return the logs file path.

    If the user passed a path as positional argument, use that. Otherwise, if
    the NFS location is available, use it. Otherwise, use the local location.
    """
    expected_fn = 'zip_access.log'
    local_logs_dir = os.path.join(REPO_ROOT, 'logs')
    local_logs_file = os.path.join(local_logs_dir, expected_fn)
    nfs_logs_file = os.path.join('/share/logs/qgreenland', expected_fn)

    if os.path.isfile(local_logs_file):
        logs_file = local_logs_file

    if os.path.isfile(nfs_logs_file):
        logs_file = nfs_logs_file

    if len(cmdl_args) > 1:
        logs_file = cmdl_args[1]

    if not os.path.isfile(logs_file):
        print(f"Log file '{logs_file}' does not exist.")
        sys.exit(1)

    return logs_file
Return the logs file path.

    If the user passed a path as positional argument, use that. Otherwise, if
    the NFS location is available, use it. Otherwise, use the local location.
    
Return the logs file path.
If the user passed a path as positional argument, use that. Otherwise, if
the NFS location is available, use it. Otherwise, use the local location.
Return the logs file path . If the user passed a path as positional argument use that . Otherwise if the NFS location is available use it . Otherwise use the local location .
def logs_file_path(cmdl_args):
    expected_fn = 'zip_access.log'
    local_logs_dir = os.path.join(REPO_ROOT, 'logs')
    local_logs_file = os.path.join(local_logs_dir, expected_fn)
    nfs_logs_file = os.path.join('/share/logs/qgreenland', expected_fn)
    if os.path.isfile(local_logs_file):
        logs_file = local_logs_file
    if os.path.isfile(nfs_logs_file):
        logs_file = nfs_logs_file
    if len(cmdl_args) > 1:
        logs_file = cmdl_args[1]
    if not os.path.isfile(logs_file):
        print(f"Log file '{logs_file}' does not exist.")
        sys.exit(1)
    return logs_file
def logs_file_path ( cmdl_args ) : expected_fn = 'zip_access.log' local_logs_dir = os . path . join ( REPO_ROOT , 'logs' ) local_logs_file = os . path . join ( local_logs_dir , expected_fn ) nfs_logs_file = os . path . join ( '/share/logs/qgreenland' , expected_fn ) if os . path . isfile ( local_logs_file ) : logs_file = local_logs_file if os . path . isfile ( nfs_logs_file ) : logs_file = nfs_logs_file if len ( cmdl_args ) > 1 : logs_file = cmdl_args [ 1 ] if not os . path . isfile ( logs_file ) : print ( f"Log file '{logs_file}' does not exist." ) sys . exit ( 1 ) return logs_file
Return the logs file path.
Return the logs file path .
"""Return the logs file path.

    If the user passed a path as positional argument, use that. Otherwise, if
    the NFS location is available, use it. Otherwise, use the local location.
    """
cmdl_args