%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/certbot/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/certbot/__pycache__/util.cpython-312.pyc

�

M/�eJd���UdZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZddlm
Z
ddlmZddlmZddlmZddlmZdd	lmZdd
lmZddlmZddlmZddlZdd
lmZddlmZddlmZddlmZddlmZe
jj?d�Z e rddl!Z!ejDe#�Z$Gd�de�Z%Gd�de�Z&Gd�d�Z'dZ(dZ)dZ*ejVjYd�Z-ej\�Z/iZ0ee1ejdfe3d<ejhdejj�Z6dee1e1ffd �Z7e$jpfd!ee1d"e
e1gdfdee1e1ffd#�Z9d$e1de:fd%�Z;d&e1ddfd'�Z<d]d(�Z=d)e1d*e>d+e:ddfd,�Z?d^d)e1d*e>d+e:ddfd-�Z@d_d.e1d*e1d/ee>defd0�ZAd.e1d1e
e>ge1fd2e>d/e>d*e1deee1ffd3�ZBd`d.e1d/e>d*e1deee1ffd4�ZC		dad.e1d5e1d/e>d*e1deee1ff
d6�ZDd.e1ddfd7�ZEd8ee1dee1fd9�ZFdee1e1ffd:�ZGde1fd;�ZHdee1fd<�ZIdbd=e1d>e1de1fd?�ZJd@e1de1fdA�ZKdcdBe:dee1e1ffdC�ZLejhdD�ZMdEe1de:fdF�ZNGdG�dHej��ZPdIe
dJdKe1dLee1e>fddfdM�ZQdNe1de1fdO�ZRdNee1eSfde1fdP�ZTdQe1de:fdR�ZUdNee1eSfde:fdS�ZVdTe1de:fdU�ZWdVe
dWedXeddfdY�ZXdZe1deee>e1ffd[�ZYdVe
dWedXeddfd\�ZZy)dzUtilities for all Certbot.�N)�Any)�Callable)�Dict)�IO)�List)�
NamedTuple)�Optional)�Set)�Tuple)�Union)�errors)�	constants)�lock)�
filesystem)�os�linuxc�,�eZdZUdZeeed<eed<y)�KeyzPContainer for an optional file path and contents for a PEM-formated private key.�file�pemN��__name__�
__module__�__qualname__�__doc__r	�str�__annotations__�bytes���./usr/lib/python3/dist-packages/certbot/util.pyrr&s��Z�
�3�-��	�Jr rc�6�eZdZUdZeeed<eed<eed<y)�CSRzPContainer for an optional file path and contents for a PEM or DER-formatted CSR.r�data�formNrrr r!r#r#,s��Z�
�3�-��
�K�

�Ir r#c�0�eZdZdZdeddfd�Zdddefd�Zy)�LooseVersiona�A version with loose rules, i.e. any given string is a valid version number.

    but regular comparison is not supported. Instead, the `try_risky_comparison` method is
    provided, which may return an error if two LooseVersions are 'incomparible'.
    For example when integer and string version components are present in the same position.

    Differences with old distutils.version.LooseVersion:
    (https://github.com/python/cpython/blob/v3.10.0/Lib/distutils/version.py#L269)
    Most version comparisons should give the same result. However, if a version has multiple
    trailing zeroes, not all of them are used in the comparison. This ensure that, for example,
    "2.0" and "2.0.0" are equal.
    �version_string�returnNc���tj|�D�cgc]}|r|dk7r|��
}}t|�D]\}}	t|�||<�||_ycc}w#t$rY�/wxYw)zhParses a version string into its components.

        :param str version_string: version string
        �.N)�_VERSION_COMPONENT_RE�split�	enumerate�int�
ValueError�version_components)�selfr(�x�
components�i�objs      r!�__init__zLooseVersion.__init__Bs���"7�!<�!<�^�!L�1�A�!"�q�C�x��1�
�1��
�+�	�F�A�s�
� #�C��
�1�
�	�#-����1��
�
��
�s�A�A�	A%�$A%�otherc��	tj|j|jd��D]\}}||kry||kDs�yy#t$r0t	dj|j|j���wxYw)a�Compares the LooseVersion to another value.

        If the other value is another LooseVersion, the version components are compared. Otherwise,
        an exception is raised.

        Comparison is performed element-wise. If the version components being compared are of
        different types, the two versions are considered incomparible. Otherwise, if either of the
        components is not equal to the other, less or greater is returned based on the comparison's
        result. In case the two versions are of different lengths, some elements in the longer
        version have not yet been compared. If these are all equal to zero, the two versions are
        equal. Otherwise, the longer version is greater.

        If the two versions are incomparible, an exception is raised. Otherwise, the returned
        integer indicates the result of the comparison. If self == other, 0 is returned.
        If self > other, 1 is returned. If self < other -1 is returned.

        Examples:
        Equality:
        - LooseVersion('1.0').try_risky_comparison(LooseVersion('1.0')) -> 0
        - LooseVersion('2.0.0a').try_risky_comparison(LooseVersion('2.0.0a')) -> 0
        Inequality:
        - LooseVersion('2.0.0').try_risky_comparison(LooseVersion('1.0')) -> 1
        - LooseVersion('1.0.1').try_risky_comparison(LooseVersion('2.0a')) -> -1
        Incomparability:
        - LooseVersion('1a').try_risky_comparison(LooseVersion('1.0')) -> ValueError
        r)�	fillvalue����z~Cannot meaningfully compare LooseVersion {} with LooseVersion {} due to comparison of version components with different types.)�	itertools�zip_longestr1�	TypeErrorr0�format)r2r8�self_vc�other_vcs    r!�try_risky_comparisonz!LooseVersion.try_risky_comparisonRs���6
	Y�%.�%:�%:�4�;R�;R�;@�;S�;S�EF�&H�
�!����X�%���x�'��
����	Y��]�$�f�T�%<�%<�e�>V�>V�W�Y�
Y�	Y�s�8A�A�A�A�9A>)rrrrrr7r/rCrr r!r'r'4s0���-�s�-�t�-� (Y�.�(Y�S�(Yr r'zzz)z$The following error was encountered:z{0}zWEither run as root, or set --config-dir, --work-dir, and --logs-dir to writeable paths.�_LOCKSz(\d+ | [a-z]+ | \.)r)c����tjj��d�vsd�vr�SdD]6}|�vs�dj�fd��|j	d�D���|<�8�S)a�
    When Certbot is run inside a Snap, certain environment variables
    are modified. But Certbot sometimes calls out to external programs,
    since it uses classic confinement. When we do that, we must modify
    the env to remove our modifications so it will use the system's
    libraries, since they may be incompatible with the versions of
    libraries included in the Snap. For example, apachectl, Nginx, and
    anything run from inside a hook should call this function and pass
    the results into the ``env`` argument of ``subprocess.Popen``.

    :returns: A modified copy of os.environ ready to pass to Popen
    :rtype: dict

    �SNAP�CERTBOT_SNAPPED)�PATH�LD_LIBRARY_PATH�:c3�2�K�|]}�d|vs�|���y�w)rFNr)�.0r3�envs  �r!�	<genexpr>z1env_no_snap_for_external_calls.<locals>.<genexpr>�s�����%c�A�c�RX�k�ab�Nb�a�%c�s��)r�environ�copy�joinr-)�	path_namerMs @r!�env_no_snap_for_external_callsrS�sq���
�*�*�/�/�
�C�
�S��-�S�8��
�0�d�	���� �X�X�%c��Y��1E�1E�c�1J�%c�c�C�	�N�d��Jr �params�logc	���	tj|dtjtjdt���}|jdk7rKddj
|��d|j�d	|j��}||�tj|��|j|jfS#tt
f$r2ddj
|�z}||�tj|��wxYw)
z�Run the script with the given params.

    :param list params: List of parameters to pass to subprocess.run
    :param callable log: Logger method to use for errors

    FT)�check�stdout�stderr�universal_newlinesrMzUnable to run the command: %s� rzError while running z.
�
)�
subprocess�run�PIPErS�OSErrorr0rQr
�SubprocessError�
returncoderXrY)rTrU�proc�msgs    r!�
run_scriptre�s���*��~�~�f�$)�%/�_�_�%/�_�_�15�"@�"B�D�����!���H�H�V��d�k�k�4�;�;�8��	�C���$�$�S�)�)��;�;����#�#��
�Z� �*�-�����0@�@���C���$�$�S�)�)�*�s�?B3�3AC4�exec�J�tjj|�\}}|rtj|�Stj
djtj�D]7}tjtjj||��s�7yy)z�Determine whether path/name refers to an executable.

    :param str exe: Executable path or name

    :returns: If exe is a valid executable
    :rtype: bool

    rHTF)r�pathr-r�
is_executablerO�pathseprQ)rfrh�_s   r!�
exe_existsrl�sz���g�g�m�m�C� �G�D�!���'�'��,�,��
�
�6�"�(�(����4����#�#�B�G�G�L�L��s�$;�<���r �dir_pathc�x�tstt�|tvrtj|�t|<yy)z�Lock the directory at dir_path until program exit.

    :param str dir_path: path to directory

    :raises errors.LockError: if the lock is held by another process

    N)rD�atexit_register�_release_locksr�lock_dir)rms r!�lock_dir_until_exitrr�s/�����'��v���=�=��2��x��r c���tj�D]}	|j��tj
�y#dj|�}tj|d��Y�WxYw)Nz(Exception occurred releasing lock: {0!r}T��exc_info)rD�values�releaser@�logger�debug�clear)�dir_lockrds  r!rprp�sZ���M�M�O�-��	-�����-��L�L�N��	-�<�C�C�H�M�C��L�L��t�L�,�s�A�*A,�	directory�mode�strictc���	t|||�t|�y#t$rD}tj	dd��tjtj|���d}~wwxYw)ahEnsure directory exists with proper permissions and is locked.

    :param str directory: Path to a directory.
    :param int mode: Directory mode.
    :param bool strict: require directory to be owned by current user

    :raises .errors.LockError: if the directory cannot be locked
    :raises .errors.Error: if the directory cannot be made or verified

    zException was:TrtN)	�make_or_verify_dirrrr`rxryr
�Error�PERM_ERR_FMTr@)r|r}r~�errors    r!�set_up_core_dirr��sV��7��9�d�F�3��I�&���7����%���5��l�l�<�.�.�u�5�6�6��7�s��	A(�?A#�#A(c��	tj||�y#t$rh}|jtjk(r;|r?tj
||�s$t
j|�dt|������Yd}~yYd}~yd}~wwxYw)a�Make sure directory exists with proper permissions.

    :param str directory: Path to a directory.
    :param int mode: Directory mode.
    :param bool strict: require directory to be owned by current user

    :raises .errors.Error: if a directory already exists,
        but has wrong permissions or owner

    :raises OSError: if invalid or inaccessible file names and
        paths, or other arguments that have the correct type,
        but are not accepted by the operating system.

    zA exists, but it should be owned by current user with permissions N)	r�makedirsr`�errno�EEXIST�check_permissionsr
r��oct)r|r}r~�	exceptions    r!r�r�sw��	����I�t�,�����?�?�e�l�l�*��j�:�:�9�d�K��l�l�)2�C��I�?�@�@�
�L�v���s��	B
�AB�B
rh�chmodc���d}|�|f}d}tj|tjtjztj
zg|���}tj||g|���S)z�Safely open a file.

    :param str path: Path to a file.
    :param str mode: Same os `mode` for `open`.
    :param int chmod: Same as `mode` for `filesystem.open`, uses Python defaults
        if ``None``.

    r)r�openr�O_CREAT�O_EXCL�O_RDWR�fdopen)rhr}r��	open_args�fdopen_args�fds      r!�	safe_openr�&s\��/1�I����H�	�02�K�	����r�z�z�B�I�I�5��	�	�A�	N�I�	N�B�
�9�9�R��,��,�,r �filename_pat�countc� �	tjj|||��}	t|||��tjj	|�fS#t
$r(}|jtjk7r�Yd}~nd}~wwxYw|dz
}��)N)r�r}r<)rrhrQr��abspathr`r�r�)rhr�r�r�r}�current_path�errs       r!�_unique_filer�7s}��
��w�w�|�|�D�,�u�*=�>��	��\��T�B�B�G�G�O�O�T`�Da�a�a���	��y�y�E�L�L�(��)��	��	��
��s�,A�	B�B�Bc�n��tjj|�\}�t|�fd�d||��S)z�Safely finds a unique file.

    :param str path: path/filename.ext
    :param int chmod: File mode
    :param str mode: Open mode

    :returns: tuple of file object and file name

    c���d|�fzS)Nz%04d_%sr)r��tails �r!�<lambda>zunique_file.<locals>.<lambda>Ps���)�u�d�m�*C�r r�r�r�r�r})rrhr-r�)rhr�r}r�s   @r!�unique_filer�Ds5��������t�$�J�D�$���C��u�4�)�)r �filenamec���tjj|d�z�}	t||��|fS#t$r(}|j
t
jk7r�Yd}~nd}~wwxYwt|�fd�d||��S)aSafely finds a unique file using lineage convention.

    :param str path: directory path
    :param str filename: proposed filename
    :param int chmod: file mode
    :param str mode: open mode

    :returns: tuple of file object and file name (which may be modified
        from the requested one by appending digits to ensure uniqueness)

    :raises OSError: if writing files fails for an unanticipated reason,
        such as a full disk or a lack of permission to write to
        specified location.

    z%s.conf)r�Nc���d�|fzS)Nz%s-%04d.confr)r�r�s �r!r�z%unique_lineage_name.<locals>.<lambda>ls���.�H�e�;L�*L�r r<r�)rrhrQr�r`r�r�r�)rhr�r�r}�preferred_pathr�s `    r!�unique_lineage_namer�Tsy���"�W�W�\�\�$�	�X�(>�?�N����u�5�~�E�E�����9�9����$��%������L��u�4�)�)s�5�	A&�A!�!A&c��	tj|�y#t$r(}|jtjk7r�Yd}~yd}~wwxYw)z!Remove a file that may not exist.N)r�remover`r��ENOENT)rhr�s  r!�
safely_remover�ps:���
�	�	�$������9�9����$��%���s��	A	�A�A	�	all_namesc��t�}|D]}	|jt|���|S#tj$rt
j
d|d��Y�OwxYw)z�Removes names that aren't considered valid by Let's Encrypt.

    :param set all_names: all names found in the configuration

    :returns: all found names that are considered valid by LE
    :rtype: set

    zNot suggesting name "%s"Trt)�set�add�enforce_le_validityr
�ConfigurationErrorrxry)r��filtered_names�names   r!�get_filtered_namesr�ysj���U�N��J��	J����2�4�8�9�J�
����(�(�	J��L�L�3�T�D�L�I�	J�s�/�+A�Ac��td��S)zc
    Get OS name and version

    :returns: (os_name, os_version)
    :rtype: `tuple` of `str`
    F��pretty)�get_python_os_inforr r!�get_os_infor��s���U�+�+r c��trtjd��}trsdjt	d���S|S)z^
    Get OS name and version string for User Agent

    :returns: os_ua
    :rtype: `str`
    Tr�r[)�_USE_DISTRO�distror�rQr�)�os_infos r!�get_os_info_uar��s4����+�+�T�*���g��x�x�*�$�7�8�8��Nr c�X�tr#tj�jd�SgS)z�
    Get a list of strings that indicate the distribution likeness to
    other distributions.

    :returns: List of distribution acronyms
    :rtype: `list` of `str`
    r[)r�r��liker-rr r!�get_systemd_os_liker��s#����{�{�}�"�"�3�'�'�
�Ir �varname�filepathc�J�|dz}tjj|�syt|d�5}|j	�}ddd�D]H}|j�j
|�s�#t|j�t|�d�cSy#1swY�WxYw)z�
    Get single value from a file formatted like systemd /etc/os-release

    :param str varname: Name of variable to fetch
    :param str filepath: File path of os-release file
    :returns: requested value
    :rtype: `str`
    �=��rN)	rrh�isfiler��	readlines�strip�
startswith�_normalize_string�len)r�r��
var_string�fh�contents�lines      r!�get_var_from_filer��s������J�
�7�7�>�>�(�#��	
�h��	�"���<�<�>��"��E���:�:�<�"�"�:�.�$�T�Z�Z�\�#�j�/�2B�%C�D�D�E��"�"�s�B�B"�origc�b�|jdd�jdd�j�S)zV
    Helper function for get_var_from_file() to remove quotes
    and whitespaces
    �"r��')�replacer�)r�s r!r�r��s+��
�<�<��R� �(�(��b�1�7�7�9�9r r�c
��tjtj�tj�tj��}|\}}}|j�}|j
d�rPtrJ|rtj�ntj�tj�}}|r|}|r|}||fS|j
d�ra	tjddgtjtjddt���}|j j#d	�}||fS|j
d
�r,|j%d�d}|j%d
�d}||fStj&�drtj&�d}||fSd}||fS#t$rDtjddgtjtjddt���}Y��wxYw)z�
    Get Operating System type/distribution and major version
    using python platform module

    :param bool pretty: If the returned OS name should be in longer (pretty) form

    :returns: (os_name, os_version)
    :rtype: `tuple` of `str`
    r�darwinz/usr/bin/sw_versz-productVersionFT)rXrYrWrZrM�sw_versr\�freebsd�-rr+r<r�)�platform�system_alias�systemrw�version�lowerr�r�r�r��idr]r^r_rSr`rX�rstrip�	partition�	win32_ver)r��info�os_type�os_verrk�distro_name�distro_versionrcs        r!r�r��s���� � ��������������D�
��G�V�Q��m�m�o�G����'�"�{�7=�f�k�k�m�6�9�9�;�PV�P^�P^�P`�^���!�G��#�F�4�F�?��3
�	�	�H�	%�
	��>�>�#�%6�7�!���z�����2�4�	�D����#�#�D�)���F�?��
�	�	�I�	&��!�!�#�&�q�)���!�!�#�&�q�)���F�?��
�	�	�	�a�	 ��#�#�%�a�(���F�?�����F�?���#�	��>�>��-�.�!���z�����2�4�	�D�	�s�AF,�,A
G9�8G9z![a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+$�emailc��tj|��|jd�xrd|vStj	d|�y)z$Scrub email address before using it.r+z..zInvalid email address: %s.F)�EMAIL_REGEX�matchr�rxr�)r�s r!�
safe_emailr�sC�������+��#�#�C�(�(�>�T��->�>�
�L�L�-�u�5�r c�6�eZdZdZ	d	dedededeeddf
d�Zy)
�DeprecatedArgumentActionz1Action to log a warning when an argument is used.N�unused1�unused2�unused3�
option_stringr)c�0�tjd|�y)NzUse of %s is deprecated.)rx�warning)r2r�r�r�r�s     r!�__call__z!DeprecatedArgumentAction.__call__s�����1�=�Ar �N)rrrrrr	rr�rr r!r�r�s<��;�04�B��B�c�B�C�B� (��
�B�9=�Br r��add_argument).N�
argument_name�nargsc�,�ttjvr`ttjt�r$tjjt�ntxjtfz
c_||ttj|��y)a�Adds a deprecated argument with the name argument_name.

    Deprecated arguments are not shown in the help. If they are used on
    the command line, a warning is shown stating that the argument is
    deprecated and no other action is taken.

    :param callable add_argument: Function that adds arguments to an
        argument parser/group.
    :param str argument_name: Name of deprecated argument.
    :param nargs: Value for nargs when adding the argument to argparse.

    )�action�helpr�N)r��configargparse�#ACTION_TYPES_THAT_DONT_NEED_A_VALUE�
isinstancer�r��argparse�SUPPRESS)r�r�r�s   r!�add_deprecated_argumentrso�� �~�'Y�'Y�Y��n�H�H�#�N��>�>�B�B�(�
*�
�>�>�(�C+�
+�>���'?��'�'�u�6r �domainc��t|�}tjd|�s$tjdj|���|j
d�}t|�dkr$tjdj|���|D]n}|jd�r%tjdj||���|jd�s�Ktjdj||���|S)	ahChecks that Let's Encrypt will consider domain to be valid.

    :param str domain: FQDN to check
    :type domain: `str`
    :returns: The domain cast to `str`, with ASCII-only contents
    :rtype: str
    :raises ConfigurationError: for invalid domains and cases where Let's
                                Encrypt currently will not issue certificates

    z^[A-Za-z0-9.-]*$zP{0} contains an invalid character. Valid characters are A-Z, a-z, 0-9, ., and -.r+�z{0} needs at least two labelsr�z1label "{0}" in domain "{1}" cannot start with "-"z/label "{0}" in domain "{1}" cannot end with "-")
�enforce_domain_sanity�rer�r
r�r@r-r�r��endswith)r�labels�labels   r!r�r�1s���#�6�
*�F�
�8�8�&��/��'�'�
<�<B�F�6�N�L�	L��\�\�#�
�F�
�6�{�Q���'�'�+�2�2�6�:�<�	<��$�����C� ��+�+�C�J�J��6�#�$�
$��>�>�#���+�+�A�H�H��6�#�$�
$�
$��Mr c�^�	t|t�r|jd�}|jd�|j�}|jd�r|ddn|}dD]G}|jdj|��s�$tjd	j||���t|�r$tjd
j|���dj|�}t|�dkDr$tjd
j|���|jd�}|D][}|s$tjdj|���t|�dkDs�8tjdj||���|S#t$rtjd��wxYw)a�Method which validates domain value and errors out if
    the requirements are not met.

    :param domain: Domain to check
    :type domain: `str` or `bytes`
    :raises ConfigurationError: for invalid domains and cases where Let's
                                Encrypt currently will not issue certificates

    :returns: The domain cast to `str`, with ASCII-only contents
    :rtype: str
    zutf-8�asciizbNon-ASCII domain names not supported. To issue for an Internationalized Domain Name, use Punycode.r+Nr;)�http�httpsz{0}://z[Requested name {0} appears to be a URL, not a FQDN. Try again without the leading "{1}://".zRequested name {0} is an IP address. The Let's Encrypt certificate authority will not issue certificates for a bare IP address.z*Requested domain {0} is not a FQDN because�z{0} it is too long.z{0} it contains an empty label.�?z{0} label {1} is too long.)rr�decode�encode�UnicodeErrorr
r�r�rr�r@�is_ipaddressr�r-)r�schemerdr
�ls     r!r
r
Ss���L��f�e�$��]�]�7�+�F��
�
�g��
�\�\�^�F�#�O�O�C�0�V�C�R�[�f�F�$������X�_�_�V�4�5��+�+�<�<B�F��F�=��
���F���'�'�
�%�v�f�~�/�	/�7�
=�
=�f�
E�C�
�6�{�S���'�'�(=�(D�(D�S�(I�J�J�
�\�\�#�
�F�
�Y����+�+�,M�,T�,T�UX�,Y�Z�Z��q�6�B�;��+�+�,H�,O�,O�PS�UV�,W�X�X�	Y��M��O�L��'�'�)K�L�	L�L�s�2F
�
F,�addressc��	tjtj|�y#tj$rB	tjtj|�Yy#tj$rYYywxYwwxYw)z�Is given address string form of IP(v4 or v6) address?

    :param address: address to check
    :type address: `str`

    :returns: True if address is valid IP address, otherwise return False.
    :rtype: bool

    TF)�socket�	inet_pton�AF_INETr��AF_INET6)rs r!rr�sc��
��������1����<�<��	����V�_�_�g�6����|�|�	��	���s&�$'�A<�$A!�!A8�4A<�7A8�8A<c�f�t|t�r|jd�S|jd�S)z�"Is domain a wildcard domain?

    :param domain: domain to check
    :type domain: `bytes` or `str`

    :returns: True if domain is a wildcard, otherwise, False
    :rtype: bool

    z*.s*.)rrr�)rs r!�is_wildcard_domainr"�s0���&�#��� � ��&�&����U�#�#r �srvc�4�|tjk(xsd|vS)z�
    Determine whether a given ACME server is a known test / staging server.

    :param str srv: the URI for the ACME server
    :returns: True iff srv is a known test / staging server
    :rtype bool:
    �staging)r�STAGING_URI)r#s r!�
is_stagingr'�s���)�'�'�'�;�9��+;�;r �func�args�kwargsc�@�tjt|g|��i|��y)aSets func to be called before the program exits.

    Special care is taken to ensure func is only called when the process
    that first imports this module exits rather than any child processes.

    :param function func: function to be called in case of an error

    N)�atexit�register�_atexit_call�r(r)r*s   r!roro�s���O�O�L�$�8��8��8r r(c�0�t|�}|jS)a�Parses a version string into its components.
    This code and the returned tuple is based on the now deprecated
    distutils.version.LooseVersion class from the Python standard library.
    Two LooseVersion classes and two lists as returned by this function should
    compare in the same way. See
    https://github.com/python/cpython/blob/v3.10.0/Lib/distutils/version.py#L205-L347.
    :param str version_string: version string
    :returns: list of parsed version string components
    :rtype: list
    )r'r1)r(�
loose_versions  r!�parse_loose_versionr2�s��!��0�M��+�+�+r c�L�ttj�k(r	||i|��yyr�)�_INITIAL_PIDr�getpidr/s   r!r.r.�s"���r�y�y�{�"��d��f��#r )r)N)i�F)�wN)i�r6)i�r6)z/etc/os-release)F)[rrr,r�r=�loggingr�rrr]�sys�typingrrrrrrr	r
rrr�certbotr
�certbot._internalrr�certbot.compatrrr�r�r��	getLoggerrrxrr#r'�
ANSI_SGR_BOLD�ANSI_SGR_RED�ANSI_SGR_RESET�lineseprQr�r5r4rDr�LockFiler�compile�VERBOSEr,rSr�re�boolrlrrrpr/r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��Actionr�rr�rr
rr"r'ror2r.rr r!�<module>rGs��� ��
�����	�
��
�������������'�"�%���l�l�%�%�g�.����	��	�	�8�	$���*���*��FY�FY�V�
������z�z��� 6�7���r�y�y�{��
$&���S�$�-�-�
� �%�"��
�
�#9�2�:�:�F����S�#�X���2>D�\�\�$�t�C�y�$�x���t��'<�$�e�TW�Y\�T\�o�$�<�C��D��&3�#�3�$�3��7�s�7�#�7�t�7��7�&�#��S��$��SW��6-�C�-�s�-��#��-�"�-�"
�s�
�(�C�5�#�:�*>�
�s�
��
�#&�
�+0��S��>�
�
)�c�
)�#�
)�S�
)�5��S��>�
)� @E�$'�)�c�)�S�)��)�!�)�,1�"�c�'�N�)�8������#�c�(��s�3�x��",�U�3��8�_�,�����T�#�Y���s��c��#��,:�C�:�C�:�3�t�3��c�3�h��3�p�b�j�j�<�=���c��d��B�x���B�6�(�9�*=�6�c�6�#(��c��?�6�7;�6�6�����D8�%��U�
�"3�8��8�v�#��$��.$�u�S�%�Z�0�$�T�$�<�C�<�D�<�	9�(�	9�3�	9�#�	9�$�	9�,��,��U�3��8�_�0E�,��x����s��t�r 

Zerion Mini Shell 1.0