Viewing File: /usr/lib/python2.7/site-packages/cloudinit/handlers/boot_hook.pyc

ó
oBú]c@sxddlZddlmZddlmZddlmZddlmZeje	ƒZ
dejfd„ƒYZdS(iÿÿÿÿN(thandlers(tlog(tutil(t
PER_ALWAYStBootHookPartHandlercBs,eZdgZd„Zd„Zd„ZRS(s#cloud-boothookcKsJtjj|tƒ|jdƒ|_d|_|rF|jƒ|_ndS(Nt	boothooks(	RtHandlert__init__Rt	get_ipathtboothook_dirtNonetinstance_idtget_instance_id(tselftpathst
datasourcet_kwargs((s@/usr/lib/python2.7/site-packages/cloudinit/handlers/boot_hook.pyRs
	cCsitj|ƒ}tjj|j|ƒ}tjtj|ƒd|jdƒ}tj	||j
ƒdƒ|S(NtprefixiiÀ(Rtclean_filenametostpathtjoinR	tstrip_prefix_suffixtdos2unixtprefixest
write_filetlstrip(R
tpayloadtfilenametfilepathtcontents((s@/usr/lib/python2.7/site-packages/cloudinit/handlers/boot_hook.pyt_write_part"scCsÄ|tjkrdS|j||ƒ}yNtjjƒ}|jdk	r\t|jƒ|d<nt	j
|gd|ƒWnJt	jk
rœt	jt
d|ƒn$tk
r¿t	jt
d|ƒnXdS(NtINSTANCE_IDtenvs#Boothooks script %s execution errors'Boothooks unknown error when running %s(RtCONTENT_SIGNALSRRtenvirontcopyRR
tstrRtsubptProcessExecutionErrortlogexctLOGt	Exception(R
tdatatctypeRRt	frequencyRR!((s@/usr/lib/python2.7/site-packages/cloudinit/handlers/boot_hook.pythandle_part*s
(t__name__t
__module__RRRR.(((s@/usr/lib/python2.7/site-packages/cloudinit/handlers/boot_hook.pyRs			(
Rt	cloudinitRRtloggingRtcloudinit.settingsRt	getLoggerR/R)RR(((s@/usr/lib/python2.7/site-packages/cloudinit/handlers/boot_hook.pyt<module>s
Back to Directory File Manager