%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3.9/site-packages/ansible/collections/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3.9/site-packages/ansible/collections/__pycache__/list.cpython-39.pyc

a

�)g'�@s�ddlmZmZmZeZddlZddlmZddl	m
Z
ddlmZddl
mZddlmZddlmZdd	lmZe�Zddd�Zdd
d�Zddd�ZdS)�)�absolute_import�division�print_functionN)�defaultdict)�AnsibleError)�is_collection_path)�to_bytes)�AnsibleCollectionConfig)�_get_collection_name_from_path)�DisplayFcCsBi}t||d�D],}tj�|�rt|�}||vs4|s|||<q|S)N)�search_paths�coll_filter)�list_collection_dirs�os�path�existsr
)r
rZdedupe�collections�	candidate�
collection�r�</usr/lib/python3.9/site-packages/ansible/collections/list.py�list_collectionss
rccsx|durg}|�tj�|D]V}t|�}tj�|�sJ|rt�d�	|��qtj�
|�sl|rt�d�	|��q|VqdS)z�
    Filter out non existing or invalid search_paths for collections
    :param search_paths: list of text-string paths, if none load default config
    :param warn: display warning if search_path does not exist
    :return: subset of original list
    Nz2The configured collection path {0} does not exist.zFThe configured collection path {0}, exists, but it is not a directory.)�extendr	Zcollection_pathsrrrr�displayZwarning�format�isdir)r�warnr�b_pathrrr�list_valid_collection_paths srccsVd}d}|durPd|vrLz|�d�\}}WqPtyHtd|��YqP0n|}tt�}t|�D]�}tj�|�dkr�tj�	|d�}t
|dd�}tj�|�r`tj�|�r`|dur�t�
|�}n|g}|D]�}tj�	|t
|��}	tj�|	�r�|du�r�t�
|	�}
n|g}
|
D]F}|||v�rt
|�}tj�	|	|�}
t|
��r|
|||<|
V�qq�q`dS)aO
    Return paths for the specific collections found in passed or configured search paths
    :param search_paths: list of text-string paths, if none load default config
    :param coll_filter: limit collections to just the specific namespace or collection, if None all are returned
    :return: list of collection directory paths
    N�.z'Invalid collection pattern supplied: %sZansible_collectionsZsurrogate_or_strict)�errors)�split�
ValueErrorrr�dictrrr�basename�joinrrr�listdirr)rr
r�	namespacerrZb_coll_rootZ
namespaces�nsZb_namespace_dirZcollsZmycollZb_collZ
b_coll_dirrrrr>s>

r)NNF)NF)NN)Z
__future__rrr�typeZ
__metaclass__rrrZansible.errorsrZansible.collectionsrZansible.module_utils._textrZansible.utils.collection_loaderr	Z2ansible.utils.collection_loader._collection_finderr
Zansible.utils.displayrrrrrrrrr�<module>s



Zerion Mini Shell 1.0