/usr/lib/python3/dist-packages/cloudinit/__pycache__
NameSizeModeActions
apport.cpython-310.pyc73170644editdlrm
atomic_helper.cpython-310.pyc28780644editdlrm
cloud.cpython-310.pyc31990644editdlrm
dmi.cpython-310.pyc63100644editdlrm
event.cpython-310.pyc20760644editdlrm
features.cpython-310.pyc16680644editdlrm
gpg.cpython-310.pyc69120644editdlrm
helpers.cpython-310.pyc136850644editdlrm
importer.cpython-310.pyc17760644editdlrm
lifecycle.cpython-310.pyc83840644editdlrm
netinfo.cpython-310.pyc140660644editdlrm
performance.cpython-310.pyc36670644editdlrm
persistence.cpython-310.pyc29310644editdlrm
registry.cpython-310.pyc14820644editdlrm
safeyaml.cpython-310.pyc79310644editdlrm
settings.cpython-310.pyc11850644editdlrm
signal_handler.cpython-310.pyc26890644editdlrm
simpletable.cpython-310.pyc26880644editdlrm
socket.cpython-310.pyc47440644editdlrm
ssh_util.cpython-310.pyc158150644editdlrm
stages.cpython-310.pyc275610644editdlrm
subp.cpython-310.pyc99720644editdlrm
templater.cpython-310.pyc63740644editdlrm
temp_utils.cpython-310.pyc28370644editdlrm
type_utils.cpython-310.pyc4710644editdlrm
url_helper.cpython-310.pyc291510644editdlrm
user_data.cpython-310.pyc85150644editdlrm
util.cpython-310.pyc708780644editdlrm
version.cpython-310.pyc4660644editdlrm
warnings.cpython-310.pyc33760644editdlrm
__init__.cpython-310.pyc1450644editdlrm
Edit: /usr/lib/python3/dist-packages/cloudinit/__pycache__/socket.cpython-310.pyc (4744B)
o thg@s~dZddlZddlZddlZddlZddlmZddlmZddl m Z ddl m Z e eZdefdd ZGd d d ZdS) z#A module for common socket helpers.N)suppress)Dict) performance)DEFAULT_RUN_DIRmessagecCstjdd}|s dS|ddkr|dddn |ddkr#td ttjtjtjB}t d t || || |d WddS1sOwYdS) z[Send a sd_notify message. :param message: sd-notify message (must be valid ascii) NOTIFY_SOCKETNr@/zUnsupported socket typezSending sd_notify(%s)ascii)osenvirongetreplaceOSErrorsocketAF_UNIX SOCK_DGRAM SOCK_CLOEXECLOGinfostrconnectsendallencode)r socket_pathsockr2/usr/lib/python3/dist-packages/cloudinit/socket.py sd_notifys   "r!c@s<eZdZdZdefddZdefddZdd Zd d Zd S) SocketSyncz>s z'SocketSync.__init__..z/shareiT)modeexist_okz/share/z.sockN)stagefirst_exceptionsystemd_exit_codeexperienced_any_errorsockets connectionsrmakedirsritemsrFileNotFoundErrorremovebindlisten)selfr#r&rrrrr __init__.s"     zSocketSync.__init__r*cCs"||jvr td|||_|S)aSet the stage before entering context. This enables the context manager to be initialized separately from each stage synchronization. :param stage: the name of a stage to synchronize Example: sync = SocketSync("stage 1", "stage 2"): with sync("stage 1"): pass with sync("stage 2"): pass zInvalid stage name: )r. ValueErrorr*)r6r*rrr __call__Os zSocketSync.__call__cCsttjrtddSd|_td|j d|j |j }t d|j | \}}|d\}}||j|j <Wdn1sHwYd|krb|dddtd t|d td |j d |S) zWait until a message has been received on this stage's socket. Once the message has been received, enter the context. z:Stdin is a tty, so skipping stage synchronization protocolNrzDSTATUS=Waiting on external services to complete before starting the z stage.zWaiting to start stage sstartzReceived invalid message: []zSTATUS=Running (z stage))risattysysstdinfilenorrr,r!r*r.rTimedacceptrecvfromr/__exit__r8r)r6r connection_chunkrrr __enter__cs,  zSocketSync.__enter__cCsttjr dSd|j}|r6d|_d|_t|d|j }d}|j s*||_ t |t d||jp=t|j|_|j|j}|d|d |jd |dS) z.Notify the socket that this stage is complete.Nz,Completed socket interaction for boot stage r Tz in zkfatal error, run "systemctl status cloud-init-main.service" and "cloud-init status --long" for more detailszSTATUS=zecho 'z'; exit ;)rr<r=r>r?r*r,r-reprtb_framer+rfatalr!boolr/rrclose)r6exc_typeexc_valexc_tbrstatusrrrr rCs,   zSocketSync.__exit__N) __name__ __module__ __qualname____doc__rr7r9rGrCrrrr r"+s ! "r")rUloggingrrr= contextlibrtypingr cloudinitrcloudinit.settingsr getLoggerrRrrr!r"rrrr s