?)! P d Z ddlZddlZddlZ G d de Zd Zd Zd ZdS )zUtility functions for xauth. Nc e Zd ZdZdS )
NotFoundErrorzError when xauth was not found.N)__name__
__module____qualname____doc__ h/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pyvirtualdisplay/xauth.pyr r s ))))r
r c t j ddgt j t j } | \ }}dS # t $ r Y dS w xY w)z3
Return whether or not xauth is installed.
xauthz-VstdoutstderrTF)
subprocessPopenPIPEcommunicateFileNotFoundError)r
_s r is_installedr sq
dO??
""1 t uus AA
AAc v t j d } t j | S )z6
Generate a cookie string suitable for xauth.
)osurandomhashlibmd5 hexdigest)datas r generate_mcookier ! s- :b>>D;t&&(((r
c t j dgt | z t j t j }| \ }}dS )z)
Call xauth with the given args.
r
r N)r r listr r )argsr
r s r callr$ ) sP
DJJ
E DAqqqr
) r r r r Exceptionr r r r$ r r
r