+
    ˜qgj  ã                   ó  € R t ^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RIH	t	H
t
 ^ RIHt Rt]P                  ! ]4      tRtR tR	 R
 ltRR R lltRR R lltR R ltR t]R8X  d   ]P0                  ! ]! 4       4       R# R# )z0Generate multi-part mime messages for user-data.N)ÚMIMEMultipart)ÚMIMEText)ÚListÚOptional)ÚINCLUSION_TYPES_MAPz	make-mimezUExample: make-mime -a config.yaml:cloud-config -a script.sh:x-shellscript > user-datac                 óØ  € . p. p\        V 4       F±  w  pw  rEpVP                  4       p\        Wv\        P                  ! 4       4      pVP                  R RV,          4       VP                  4       P                  4       p	V	\        4       9  d#   RV	: RV^,            R2p
VP                  V
4       VP                  V4       K³  	  \        4       pV F  pVP                  V4       K  	  W²3# )zContent-Dispositionzattachment; filename="%s"zcontent type z for attachment z may be incorrect!)Ú	enumerateÚreadr   ÚsysÚgetdefaultencodingÚ
add_headerÚget_content_typeÚlowerÚget_content_typesÚappendr   Úattach)ÚfilesÚsub_messagesÚerrorsÚiÚfhÚfilenameÚformat_typeÚcontentsÚsub_messageÚcontent_typeÚerr_msgÚcombined_messageÚmsgs   &            Ú?/usr/lib/python3/dist-packages/cloudinit/cmd/devel/make_mime.pyÚcreate_mime_messager       sí   € Ø€LØ€FÜ*3°EÖ*:Ñ&ˆÑ&ˆB˜+Ø—7‘7“9ˆÜ˜x´c×6LÒ6LÓ6NÓOˆØ×ÑØ!Ð#>À(Õ#Kô	
ð #×3Ñ3Ó5×;Ñ;Ó=ˆØÔ0Ó2Ô2à Ñ/ð 0Ø˜•E�7Ð,ð.ð ð �M‰M˜'Ô"Ø×Ñ˜KÖ(ñ +;ô %“ÐÛˆØ×Ñ Ö$ñ àÐ%Ð%ó    c                ó$   € V ^8„  d   QhR\         /# )é   Útext)Ústr)Úformats   "r   Ú__annotate__r'   /   s   € ÷ ñ œCñ r!   c                óÈ   €  V P                  R^4      w  r\        VR4      WP                  4       3#   \         d%   p\        P
                  ! RRT ,          4      ThRp?ii ; i)z@Return file content type by reading the first line of the input.Ú:ÚrNzInvalid value for %r)ÚsplitÚopenÚstripÚ
ValueErrorÚargparseÚArgumentError)r$   r   r   Úes   &   r   Úfile_content_typer2   /   sf   € ðØ!%§¡¨C°Ó!3ÑˆÜ�X˜sÓ# X×/AÑ/AÓ/CÐDÐDøÜô Ü×$Ò$ØÐ(¨DÕ1ó
àð	ûðús   ‚/2 ²A!½AÁA!c                ón   € V ^8„  d   QhR\         \        P                  ,          R\        P                  /# )r#   ÚparserÚreturn)r   r/   ÚArgumentParser)r&   s   "r   r'   r'   :   s-   € ÷ 'ñ 'Ü”X×,Ñ,Õ-ð'ä×Ññ'r!   c                óþ   € V '       g   \         P                  ! 4       p \        V n        \        V n        V P                  RRR\        R. RRR7       V P                  RR	R
RRR7       V P                  RRR
RRR7       V # )a
  Build or extend and arg parser for make-mime utility.

@param parser: Optional existing ArgumentParser instance representing the
    subcommand which will be extended to support the args of this utility.

@returns: ArgumentParser with proper argument configuration.
z-az--attachr   r   z<file>:<content-type>z3attach the given file as the specified content-type)ÚdestÚtypeÚactionÚdefaultÚmetavarÚhelpz-lz--list-typesÚ
store_trueFz&List support cloud-init content types.)r:   r;   r=   z-fz--forcez$Ignore unknown content-type warnings)r/   r6   Ú__doc__ÚdescriptionÚEPILOGÚepilogÚadd_argumentr2   )r4   s   &r   Ú
get_parserrD   :   sž   € ÷ Ü×(Ò(Ó*ˆä €FÔÜ€F„MØ
×ÑØØØÜØØØ'ØBð ô 	ð ×ÑØØØØØ5ð ô ð ×ÑØØØØØ3ð ô ð €Mr!   c                óF   € V ^8„  d   QhR\         R\        \        ,          /# )r#   Ústrip_prefixr5   )Úboolr   r%   )r&   s   "r   r'   r'   d   s   € ÷ 	ñ 	¤Dð 	´T¼#µYñ 	r!   c           	     óœ   € \        \        P                  ! 4        Uu. uF  pV '       d   VP                  RR4      MTNK!  	  up4      # u upi )z�Return a list of cloud-init supported content types.  Optionally
strip out the leading 'text/' of the type if strip_prefix=True.
ztext/Ú )Úsortedr   ÚvaluesÚreplace)rF   Úctypes   & r   r   r   d   sN   € ô ô -×3Ò3Ô5ó	
á5�÷ +7ˆE�M‰M˜' 2Ô&¸EÒAÙ5ñ	
óð ùò	
s
   �A	ªA	c                óP   € V ^8„  d   QhR\         R\        P                  R\        /# )r#   ÚnameÚargsr5   )r%   r/   Ú	NamespaceÚint)r&   s   "r   r'   r'   p   s'   € ÷ ñ ”cð ¤×!3Ñ!3ð ¼ñ r!   c                ó¸  € VP                   '       d'   \        RP                  \        RR7      4      4       ^ # \	        VP
                  4      w  r#V'       dx   VP                  '       d   RMRpV F(  p\        P                  P                  V RV R24       K*  	  \        P                  P                  R4       VP                  '       g   ^# \        V4       ^ # )a(  Create a multi-part MIME archive for use as user-data.  Optionally
   print out the list of supported content types of cloud-init.

Also setup CLI log handlers to report to stderr since this is a development
utility which should be run by a human on the CLI.

@return 0 on success, 1 on failure.
Ú
T)rF   ÚWARNINGÚERRORz: z-Invalid content-types, override with --force
)
Ú
list_typesÚprintÚjoinr   r    r   Úforcer
   ÚstderrÚwrite)rO   rP   r   r   ÚlevelÚerrors   &&    r   Úhandle_argsr_   p   sŸ   € ð ‡‡€Üˆd�i‰iÔ)°tÔ<Ó=Ô>Ùä2°4·:±:Ó>ÑÐßØ!ŸZŸZ˜Z‘	¨WˆÛˆEÜ�J‰J×Ñ ˜w b¨¨¨rÐ2Ö3ñ ä�
‰
×ÑÐIÔJØ�z�zˆzÙÜ	Ð
ÔÙr!   c                  óR   € \        4       P                  4       p \        \        V 4      # ©N)rD   Ú
parse_argsr_   ÚNAME)rP   s    r   Úmainrd   ‰   s   € Ü‹<×"Ñ"Ó$€DÜ”t˜TÓ"Ð"r!   Ú__main__ra   )F)r?   r/   Úloggingr
   Úemail.mime.multipartr   Úemail.mime.textr   Útypingr   r   Úcloudinit.handlersr   rc   Ú	getLoggerÚ__name__ÚLOGrA   r    r2   rD   r   r_   rd   Úexit© r!   r   Ú<module>rp      sz   ðñ
 7ã Û Û 
Ý .Ý $ß !å 2à€Ø×Ò˜Ó!€ð-ð ò&õ.÷'÷T	õò2#ð
 ˆzÔØ‡H‚H‰T‹VÖñ r!   