(**kwargs)
return return_list
Locates system files

    Expected kwargs: known_dirs, search_mask
Locates system files
Locates system files
def find_system_files(**kwargs):
    """Locates system files

    Expected kwargs: known_dirs, search_mask
    """

    # Define known Linux folders for storing service unit definitions
    return_list = set()

    # Recursively gather all service unit from the known directories
    # and add them to a deduplicated set.
    for directory in kwargs['known_dirs']:
        found_files = glob.glob(directory + kwargs['search_mask'])
        for item in found_files:
            # We don't care about files that point to /dev/null.
            if '/dev/null' not in os.path.realpath(item):
                return_list.add(item)

    if ARGS.debug:
        print("DEBUG, FOUND FILES")
        for item in return_list:
            print(item)

    return return_list
def find_system_files ( * * kwargs ) : # Define known Linux folders for storing service unit definitions return_list = set ( ) # Recursively gather all service unit from the known directories # and add them to a deduplicated set. for directory in kwargs [ 'known_dirs' ] : found_files = glob . glob ( directory + kwargs [ 'search_mask' ] ) for item in found_files : # We don't care about files that point to /dev/null. if '/dev/null' not in os . path . realpath ( item ) : return_list . add ( item ) if ARGS . debug : print ( "DEBUG, FOUND FILES" ) for item in return_list : print ( item ) return return_list