Dashboard
PHP:
8.2.30
OS:
Linux
User:
dh_nv8b2m
/
/
usr
/
local
/
lib
/
python3.10
/
dist-packages
/
ansible
/
plugins
/
action
/
__pycache__
📤 Upload
📝 New File
📁 New Folder
Close
Editing: assemble.cpython-310.pyc
o O�h� � @ s� d dl mZ d dlZd dlZd dlZd dlZd dlZd dlmZ d dl mZmZm Z mZ d dlmZmZ d dlmZ d dlmZ d dlmZ G d d � d e�ZdS )� )�annotationsN)� constants)�AnsibleError� AnsibleAction�_AnsibleActionDone�AnsibleActionFail)� to_native�to_text)�boolean)� ActionBase)� checksum_sc s, e Zd ZdZddd�Zd � fdd� Z� ZS ) �ActionModuleTNFc C s4 t jtjd�\}}t�|d�}d} d} dd� tt�|��D �D ]t}|r)|�|�s)qd||f }tj � |�r@|rAtj �|��d�rAqt | jj||d�d ��} | �� }W d � n1 s[w Y | rg|�d� | r�|r�t�|�d }|�|� |d dkr�|�d� |�|� d} |�d�r�d} qd} q|�� |S )z/ assemble a file from a directory of fragments )�dir�wbFc s s � | ] }t |d d�V qdS )�surrogate_or_strict)�errorsN)r )�.0�p� r �J/usr/local/lib/python3.10/dist-packages/ansible/plugins/action/assemble.py� <genexpr>/ s � z8ActionModule._assemble_from_fragments.<locals>.<genexpr>z%s/%s�.)�decrypt�rbN� r ���T)�tempfile�mkstemp�C�DEFAULT_LOCAL_TMP�os�fdopen�sorted�listdir�search�path�isfile�basename� startswith�open�_loader� get_real_file�read�write�codecs� escape_decode�endswith�close)�self�src_path� delimiter�compiled_regexp� ignore_hiddenr �tmpfd� temp_path�tmp� delimit_me�add_newline�f�fragment�fragment_fh�fragment_contentr r r �_assemble_from_fragments'