📂 Advanced File Manager
Multi-Root Navigation System
⚡ Quick Jump
Server (/)
Home (/home)
Var_www (/var/www)
Current (/home4/shelley/public_html/shelleycutler.com/wp-content/mu-plugins)
📍 Go
⬆ Ke Atas
🏠 Root Server
🏠 Root App
🔄 Refresh
📀 /
›
usr
›
lib
›
python3.9
›
site-packages
›
cloudinit
›
cmd
›
devel
›
📁 __pycache__
📍
Lokasi:
/usr/lib/python3.9/site-packages/cloudinit/cmd/devel/__pycache__
💾
Free:
45.9 GB
⚠️ Direktori ini
tidak writable
.
✏️ Mengedit: make_mime.cpython-39.opt-1.pyc
a '�DgZ � @ s� d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z dZ e�e�Z dZdd � Zd d� Zddd �Zddd�Zdd� Zdd� Zedkr�e�e� � dS )z0Generate multi-part mime messages for user-data.� N)� MIMEMultipart)�MIMEText)�INCLUSION_TYPES_MAPz make-mimezUExample: make-mime -a config.yaml:cloud-config -a script.sh:x-shellscript > user-datac C s� g }g }t | �D ]p\}\}}}|�� }t||t�� �}|�dd| � |�� �� } | t� vrvd| |d f } |� | � |� |� qt � }|D ]} |�| � q�||fS )NzContent-Dispositionzattachment; filename="%s"z3content type %r for attachment %s may be incorrect!� )� enumerate�readr �sys�getdefaultencodingZ add_headerZget_content_type�lower�get_content_types�appendr Zattach)�filesZsub_messages�errors�iZfh�filenameZformat_type�contentsZsub_message�content_type�msg�combined_message� r �A/usr/lib/python3.9/site-packages/cloudinit/cmd/devel/make_mime.py�create_mime_message s( � � r c C sb z&| � dd�\}}t|d�||�� fW S ty\ } zt�| d| �|�W Y d}~n d}~0 0 dS )z@Return file content type by reading the first line of the input.�:r �rzInvalid value for %rN)�split�open�strip� ValueError�argparse� ArgumentError)�textr r �er r r �file_content_type. s ��r"