__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

�ێe��	��SrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK
JrJrJ
r
JrJrJrJrJrJr SSK
Jr Sr"SS\5r"SS	\5r\R4R7S
S5r\R4R7SS
5rSrSSS.rSSSSSS.r SS0r!\RD"S5r#\RD"S5r$/SQr%SSS\SSSSS4	r&S?S \'S!\\(\(\(44S"jjr)S!\(4S#jr*S@S$\'S!\(4S%jjr+SAS$\'S&\'S!\(4S'jjr,S@S&\'S!\\(\(\(44S(jjr-S@S&\'S!\(4S)jjr.S@S&\'S!\(4S*jjr/S@S&\'S!\(4S+jjr0S!\(4S,jr1S!\(4S-jr2SAS$\'S&\'S!\4S.jjr3S!\
\(\(44S/jr4S!\
\(\(44S0jr5S!\
\(\(44S1jr6S!\
\(\(44S2jr7S3\(S!\(4S4jr8S3\(S!\(4S5jr9S3\(S!\(4S6jr:S3\(S!\(4S7jr;SS8K<J=r= "S;S<5r>\>"5r?SBS=jr@\AS>:Xa\@"5 gg!\a \rGN�f=f!\a
 "S9S:5r=NFf=f)Ca�
The ``distro`` package (``distro`` stands for Linux Distribution) provides
information about the Linux distribution it runs on, such as a reliable
machine-readable distro ID, or version information.

It is the recommended replacement for Python's original
:py:func:`platform.linux_distribution` function, but it provides much more
functionality. An alternative implementation became necessary because Python
3.5 deprecated this function, and Python 3.8 removed it altogether. Its
predecessor function :py:func:`platform.dist` was already deprecated since
Python 2.6 and removed in Python 3.8. Still, there are many cases in which
access to OS distribution information is needed. See `Python issue 1322
<https://bugs.python.org/issue1322>`_ for more information.
�N)	�Any�Callable�Dict�Iterable�Optional�Sequence�TextIO�Tuple�Type)�	TypedDictz1.9.0c�4�\rSrSr%\\S'\\S'\\S'Srg)�VersionDict�=�major�minor�build_number�N)�__name__�
__module__�__qualname__�__firstlineno__�str�__annotations__�__static_attributes__r��//usr/lib/python3/dist-packages/distro/distro.pyrr=s���J��J��rrc�H�\rSrSr%\\S'\\S'\\S'\\S'\\S'Srg)	�InfoDict�C�id�version�
version_parts�like�codenamerN)rrrrrrrrrrrrrCs���G�
�L���

�I��Mrr�UNIXCONFDIRz/etc�
UNIXUSRLIBDIRz/usr/libz
os-release�oracle�opensuse)�olz
opensuse-leap�rhel)�enterpriseenterpriseas�enterpriseenterpriseserver�redhatenterpriseworkstation�redhatenterpriseserver�redhatenterprisecomputenode�redhatzA(?:[^)]*\)(.*)\()? *(?:STL )?([\d.+\-a-z]*\d) *(?:esaeler *)?(.+)z(\w+)[-_](release|version)$)zSuSE-releasezaltlinux-releasezarch-releasezbase-releasezcentos-releasezfedora-releasezgentoo-releasezmageia-releasezmandrake-releasezmandriva-releasezmandrivalinux-releasezmanjaro-releasezoracle-releasezredhat-releasez
rocky-releasez
sl-releasezslackware-version�debian_versionzlsb-releasezoem-releasezsystem-releasez
plesk-releaseziredmail-releasez
board-release�ec2_version�full_distribution_name�returnc�`�[R"S[SS9 [R	U5$)aA
.. deprecated:: 1.6.0

    :func:`distro.linux_distribution()` is deprecated. It should only be
    used as a compatibility shim with Python's
    :py:func:`platform.linux_distribution()`. Please use :func:`distro.id`,
    :func:`distro.version` and :func:`distro.name` instead.

Return information about the current OS distribution as a tuple
``(id_name, version, codename)`` with items as follows:

* ``id_name``:  If *full_distribution_name* is false, the result of
  :func:`distro.id`. Otherwise, the result of :func:`distro.name`.

* ``version``:  The result of :func:`distro.version`.

* ``codename``:  The extra item (usually in parentheses) after the
  os-release version number, or the result of :func:`distro.codename`.

The interface of this function is compatible with the original
:py:func:`platform.linux_distribution` function, supporting a subset of
its parameters.

The data it returns may not exactly be the same, because it uses more data
sources than the original function, and that may lead to different data if
the OS distribution is not consistent across multiple data sources it
provides (there are indeed such distributions ...).

Another reason for differences is the fact that the :func:`distro.id`
method normalizes the distro ID string to a reliable machine-readable value
for a number of popular OS distributions.
z�distro.linux_distribution() is deprecated. It should only be used as a compatibility shim with Python's platform.linux_distribution(). Please use distro.id(), distro.version() and distro.name() instead.�)�
stacklevel)�warnings�warn�DeprecationWarning�_distro�linux_distribution)r3s rr<r<�s3��B
�M�M�	C�	����%�%�&<�=�=rc�*�[R5$)a�

Return the distro ID of the current distribution, as a
machine-readable string.

For a number of OS distributions, the returned distro ID value is
*reliable*, in the sense that it is documented and that it does not change
across releases of the distribution.

This package maintains the following reliable distro ID values:

==============  =========================================
Distro ID       Distribution
==============  =========================================
"ubuntu"        Ubuntu
"debian"        Debian
"rhel"          RedHat Enterprise Linux
"centos"        CentOS
"fedora"        Fedora
"sles"          SUSE Linux Enterprise Server
"opensuse"      openSUSE
"amzn"          Amazon Linux
"arch"          Arch Linux
"buildroot"     Buildroot
"cloudlinux"    CloudLinux OS
"exherbo"       Exherbo Linux
"gentoo"        GenToo Linux
"ibm_powerkvm"  IBM PowerKVM
"kvmibm"        KVM for IBM z Systems
"linuxmint"     Linux Mint
"mageia"        Mageia
"mandriva"      Mandriva Linux
"parallels"     Parallels
"pidora"        Pidora
"raspbian"      Raspbian
"oracle"        Oracle Linux (and Oracle Enterprise Linux)
"scientific"    Scientific Linux
"slackware"     Slackware
"xenserver"     XenServer
"openbsd"       OpenBSD
"netbsd"        NetBSD
"freebsd"       FreeBSD
"midnightbsd"   MidnightBSD
"rocky"         Rocky Linux
"aix"           AIX
"guix"          Guix System
"altlinux"      ALT Linux
==============  =========================================

If you have a need to get distros for reliable IDs added into this set,
or if you find that the :func:`distro.id` function returns a different
distro ID for one of the listed distros, please create an issue in the
`distro issue tracker`_.

**Lookup hierarchy and transformations:**

First, the ID is obtained from the following sources, in the specified
order. The first available and non-empty value is used:

* the value of the "ID" attribute of the os-release file,

* the value of the "Distributor ID" attribute returned by the lsb_release
  command,

* the first part of the file name of the distro release file,

The so determined ID value then passes the following transformations,
before it is returned by this method:

* it is translated to lower case,

* blanks (which should not be there anyway) are translated to underscores,

* a normalization of the ID is performed, based upon
  `normalization tables`_. The purpose of this normalization is to ensure
  that the ID is as reliable as possible, even across incompatible changes
  in the OS distributions. A common reason for an incompatible change is
  the addition of an os-release file, or the addition of the lsb_release
  command, with ID values that differ from what was previously determined
  from the distro release file name.
)r;r rrrr r �s��b�:�:�<�r�prettyc�,�[RU5$)a
Return the name of the current OS distribution, as a human-readable
string.

If *pretty* is false, the name is returned without version or codename.
(e.g. "CentOS Linux")

If *pretty* is true, the version and codename are appended.
(e.g. "CentOS Linux 7.1.1503 (Core)")

**Lookup hierarchy:**

The name is obtained from the following sources, in the specified order.
The first available and non-empty value is used:

* If *pretty* is false:

  - the value of the "NAME" attribute of the os-release file,

  - the value of the "Distributor ID" attribute returned by the lsb_release
    command,

  - the value of the "<name>" field of the distro release file.

* If *pretty* is true:

  - the value of the "PRETTY_NAME" attribute of the os-release file,

  - the value of the "Description" attribute returned by the lsb_release
    command,

  - the value of the "<name>" field of the distro release file, appended
    with the value of the pretty version ("<version_id>" and "<codename>"
    fields) of the distro release file, if available.
)r;�name�r>s rr@r@s��H�<�<���r�bestc�,�[RX5$)a�
Return the version of the current OS distribution, as a human-readable
string.

If *pretty* is false, the version is returned without codename (e.g.
"7.0").

If *pretty* is true, the codename in parenthesis is appended, if the
codename is non-empty (e.g. "7.0 (Maipo)").

Some distributions provide version numbers with different precisions in
the different sources of distribution information. Examining the different
sources in a fixed priority order does not always yield the most precise
version (e.g. for Debian 8.2, or CentOS 7.1).

Some other distributions may not provide this kind of information. In these
cases, an empty string would be returned. This behavior can be observed
with rolling releases distributions (e.g. Arch Linux).

The *best* parameter can be used to control the approach for the returned
version:

If *best* is false, the first non-empty version number in priority order of
the examined sources is returned.

If *best* is true, the most precise version number out of all examined
sources is returned.

**Lookup hierarchy:**

In all cases, the version number is obtained from the following sources.
If *best* is false, this order represents the priority order:

* the value of the "VERSION_ID" attribute of the os-release file,
* the value of the "Release" attribute returned by the lsb_release
  command,
* the version number parsed from the "<version_id>" field of the first line
  of the distro release file,
* the version number parsed from the "PRETTY_NAME" attribute of the
  os-release file, if it follows the format of the distro release files.
* the version number parsed from the "Description" attribute returned by
  the lsb_release command, if it follows the format of the distro release
  files.
)r;r!�r>rBs  rr!r!Fs��Z�?�?�6�(�(rc�,�[RU5$)a�
Return the version of the current OS distribution as a tuple
``(major, minor, build_number)`` with items as follows:

* ``major``:  The result of :func:`distro.major_version`.

* ``minor``:  The result of :func:`distro.minor_version`.

* ``build_number``:  The result of :func:`distro.build_number`.

For a description of the *best* parameter, see the :func:`distro.version`
method.
)r;r"�rBs rr"r"vs��� � ��&�&rc�,�[RU5$)a
Return the major version of the current OS distribution, as a string,
if provided.
Otherwise, the empty string is returned. The major version is the first
part of the dot-separated version string.

For a description of the *best* parameter, see the :func:`distro.version`
method.
)r;�
major_versionrFs rrHrH����� � ��&�&rc�,�[RU5$)a
Return the minor version of the current OS distribution, as a string,
if provided.
Otherwise, the empty string is returned. The minor version is the second
part of the dot-separated version string.

For a description of the *best* parameter, see the :func:`distro.version`
method.
)r;�
minor_versionrFs rrKrK�rIrc�,�[RU5$)a
Return the build number of the current OS distribution, as a string,
if provided.
Otherwise, the empty string is returned. The build number is the third part
of the dot-separated version string.

For a description of the *best* parameter, see the :func:`distro.version`
method.
)r;rrFs rrr�s������%�%rc�*�[R5$)a�
Return a space-separated list of distro IDs of distributions that are
closely related to the current OS distribution in regards to packaging
and programming interfaces, for example distributions the current
distribution is a derivative from.

**Lookup hierarchy:**

This information item is only provided by the os-release file.
For details, see the description of the "ID_LIKE" attribute in the
`os-release man page
<http://www.freedesktop.org/software/systemd/man/os-release.html>`_.
)r;r#rrrr#r#�s���<�<�>�rc�*�[R5$)ar
Return the codename for the release of the current OS distribution,
as a string.

If the distribution does not have a codename, an empty string is returned.

Note that the returned codename is not always really a codename. For
example, openSUSE returns "x86_64". This function does not handle such
cases in any special way and just returns the string it finds, if any.

**Lookup hierarchy:**

* the codename within the "VERSION" attribute of the os-release file, if
  provided,

* the value of the "Codename" attribute returned by the lsb_release
  command,

* the value of the "<codename>" field of the distro release file.
)r;r$rrrr$r$�s��*����rc�,�[RX5$)ad
Return certain machine-readable information items about the current OS
distribution in a dictionary, as shown in the following example:

.. sourcecode:: python

    {
        'id': 'rhel',
        'version': '7.0',
        'version_parts': {
            'major': '7',
            'minor': '0',
            'build_number': ''
        },
        'like': 'fedora',
        'codename': 'Maipo'
    }

The dictionary structure and keys are always the same, regardless of which
information items are available in the underlying data sources. The values
for the various keys are as follows:

* ``id``:  The result of :func:`distro.id`.

* ``version``:  The result of :func:`distro.version`.

* ``version_parts -> major``:  The result of :func:`distro.major_version`.

* ``version_parts -> minor``:  The result of :func:`distro.minor_version`.

* ``version_parts -> build_number``:  The result of
  :func:`distro.build_number`.

* ``like``:  The result of :func:`distro.like`.

* ``codename``:  The result of :func:`distro.codename`.

For a description of the *pretty* and *best* parameters, see the
:func:`distro.version` method.
)r;�inforDs  rrPrP�s��R�<�<��%�%rc�*�[R5$)z�
Return a dictionary containing key-value pairs for the information items
from the os-release file data source of the current OS distribution.

See `os-release file`_ for details about these information items.
)r;�os_release_inforrrrRrRs���"�"�$�$rc�*�[R5$)z�
Return a dictionary containing key-value pairs for the information items
from the lsb_release command data source of the current OS distribution.

See `lsb_release command output`_ for details about these information
items.
)r;�lsb_release_inforrrrTrT
s���#�#�%�%rc�*�[R5$)z�
Return a dictionary containing key-value pairs for the information items
from the distro release file data source of the current OS distribution.

See `distro release file`_ for details about these information items.
)r;�distro_release_inforrrrVrVs���&�&�(�(rc�*�[R5$)z�
Return a dictionary containing key-value pairs for the information items
from the distro release file data source of the current OS distribution.
)r;�
uname_inforrrrXrX"s��
����r�	attributec�,�[RU5$)ao
Return a single named information item from the os-release file data source
of the current OS distribution.

Parameters:

* ``attribute`` (string): Key of the information item.

Returns:

* (string): Value of the information item, if the item exists.
  The empty string, if the item does not exist.

See `os-release file`_ for details about these information items.
)r;�os_release_attr�rYs rr[r[*s�� �"�"�9�-�-rc�,�[RU5$)a�
Return a single named information item from the lsb_release command output
data source of the current OS distribution.

Parameters:

* ``attribute`` (string): Key of the information item.

Returns:

* (string): Value of the information item, if the item exists.
  The empty string, if the item does not exist.

See `lsb_release command output`_ for details about these information
items.
)r;�lsb_release_attrr\s rr^r^=s��"�#�#�I�.�.rc�,�[RU5$)aw
Return a single named information item from the distro release file
data source of the current OS distribution.

Parameters:

* ``attribute`` (string): Key of the information item.

Returns:

* (string): Value of the information item, if the item exists.
  The empty string, if the item does not exist.

See `distro release file`_ for details about these information items.
)r;�distro_release_attrr\s rr`r`Qs�� �&�&�y�1�1rc�,�[RU5$)a:
Return a single named information item from the distro release file
data source of the current OS distribution.

Parameters:

* ``attribute`` (string): Key of the information item.

Returns:

* (string): Value of the information item, if the item exists.
            The empty string, if the item does not exist.
)r;�
uname_attrr\s rrbrbds�����i�(�(r)�cached_propertyc�R�\rSrSrSrS\\/\4SS4SjrS\S\\S\4S	jr	S
r
g)rciyz�A version of @property which caches the value.  On access, it calls the
underlying function and sets the value in `__dict__` so future accesses
will not re-call the property.
�fr4Nc�2�URUlXlg�N)r�_fname�_f)�selfres  r�__init__�cached_property.__init__s���*�*�D�K��Gr�obj�ownerc��UcSURS35eURU5=o1RUR'U$)Nzcall z on an instance)rhri�__dict__)rjrmrn�rets    r�__get__�cached_property.__get__�s@���?�H�e�D�K�K�=��$H�H�?�.2�g�g�c�l�:�C�,�,�t�{�{�+��Jr)rirh)rrrr�__doc__rrrkrrrrrrrrcrcysC��	�
	�h��u�c�z�2�	�t�	�	�s�	�4��9�	��	rrcc��\rSrSrSrS6S\\S\S\S\\S\\S	\\S
S4SjjrS
\4Sjr	S7S
\S
\
\\\44SjjrS
\4SjrS8S\S
\4Sjjr
S9S\S\S
\4SjjrS8S\S
\
\\\44SjjrS8S\S
\4SjjrS8S\S
\4SjjrS8S\S
\4SjjrS
\4SjrS
\4SjrS9S\S\S
\4SjjrS
\\\44SjrS
\\\44SjrS
\\\44SjrS
\\\44SjrS
\4SjrS \S
\4S!jrS \S
\4S"jrS \S
\4S#jrS \S
\4S$jr \!S
\\\44S%j5r"\#S&\$S
\\\44S'j5r%\!S
\\\44S(j5r&\#S&\'\S
\\\44S)j5r(\!S
\\\44S*j5r)\!S
\4S+j5r*\!S
\4S,j5r+\#S&\,\S
\\\44S-j5r-\#S.\.S
\4S/j5r/\!S
\\\44S0j5r0S1\S
\\\44S2jr1\#S3\S
\\\44S4j5r2S5r3g):�LinuxDistributioni�a�
Provides information about a OS distribution.

This package creates a private module-global instance of this class with
default initialization arguments, that is used by the
`consolidated accessor functions`_ and `single source accessor functions`_.
By using default initialization arguments, that module-global instance
returns data about the current OS distribution (i.e. the distro this
package runs on).

Normally, it is not necessary to create additional instances of this class.
However, in situations where control is needed over the exact data sources
that are used, instances of this class can be created with a specific
distro release file, or a specific os-release file, or without invoking the
lsb_release command.
N�include_lsb�os_release_file�distro_release_file�
include_uname�root_dir�include_oslevelr4c�>�XPlU(a [RRUS5O[UlU(a [RRUS5O[UlU(aX lO�[RRUR
[5n[RRUR[5n[RRU5(d$[RRU5(dXplOX�lU=(d SUlUSLn	U	(a U(dU(dU(a[S5eUbUOU	(+Ul
UbUOU	(+UlUbUUlgU	(+Ulg)a�
The initialization method of this class gathers information from the
available data sources, and stores that in private instance attributes.
Subsequent access to the information items uses these private instance
attributes, so that the data sources are read only once.

Parameters:

* ``include_lsb`` (bool): Controls whether the
  `lsb_release command output`_ is included as a data source.

  If the lsb_release command is not available in the program execution
  path, the data source for the lsb_release command will be empty.

* ``os_release_file`` (string): The path name of the
  `os-release file`_ that is to be used as a data source.

  An empty string (the default) will cause the default path name to
  be used (see `os-release file`_ for details).

  If the specified or defaulted os-release file does not exist, the
  data source for the os-release file will be empty.

* ``distro_release_file`` (string): The path name of the
  `distro release file`_ that is to be used as a data source.

  An empty string (the default) will cause a default search algorithm
  to be used (see `distro release file`_ for details).

  If the specified distro release file does not exist, or if no default
  distro release file can be found, the data source for the distro
  release file will be empty.

* ``include_uname`` (bool): Controls whether uname command output is
  included as a data source. If the uname command is not available in
  the program execution path the data source for the uname command will
  be empty.

* ``root_dir`` (string): The absolute path to the root directory to use
  to find distro-related information files. Note that ``include_*``
  parameters must not be enabled in combination with ``root_dir``.

* ``include_oslevel`` (bool): Controls whether (AIX) oslevel command
  output is included as a data source. If the oslevel command is not
  available in the program execution path the data source will be
  empty.

Public instance attributes:

* ``os_release_file`` (string): The path name of the
  `os-release file`_ that is actually used as a data source. The
  empty string if no distro release file is used as a data source.

* ``distro_release_file`` (string): The path name of the
  `distro release file`_ that is actually used as a data source. The
  empty string if no distro release file is used as a data source.

* ``include_lsb`` (bool): The result of the ``include_lsb`` parameter.
  This controls whether the lsb information will be loaded.

* ``include_uname`` (bool): The result of the ``include_uname``
  parameter. This controls whether the uname information will
  be loaded.

* ``include_oslevel`` (bool): The result of the ``include_oslevel``
  parameter. This controls whether (AIX) oslevel information will be
  loaded.

* ``root_dir`` (string): The result of the ``root_dir`` parameter.
  The absolute path to the root directory to use to find distro-related
  information files.

Raises:

* :py:exc:`ValueError`: Initialization parameters combination is not
   supported.

* :py:exc:`OSError`: Some I/O issue with an os-release file or distro
  release file.

* :py:exc:`UnicodeError`: A data source has unexpected characters or
  uses an unexpected encoding.
�etczusr/lib�NzcIncluding subprocess data sources from specific root_dir is disallowed to prevent false information)r{�os�path�join�_UNIXCONFDIR�etc_dir�_UNIXUSRLIBDIR�usr_lib_dirrx�_OS_RELEASE_BASENAME�isfilery�
ValueErrorrwrzr|)
rjrwrxryrzr{r|�etc_dir_os_release_file�usr_lib_os_release_file�is_root_dir_defineds
          rrk�LinuxDistribution.__init__�sD��x!�
�8@�r�w�w�|�|�H�e�4�l���19�B�G�G�L�L��9�-�~�	
���#2� �&(�g�g�l�l�4�<�<�AU�&V�#�&(�g�g�l�l�� � �"6�'�#��w�w�~�~�5�6�6�b�g�g�n�n�'�?�?�(?�$�'>�$�#6�#<�"�� �&�d�2���K�=�O��0��
�
'�2�K�<O�8O�	
��+�6�M�@S�<S�	
�� /�:�O�	
��DW�@W�	
�rc� �SRUS9$)zReturn repr of all infoa�LinuxDistribution(os_release_file={self.os_release_file!r}, distro_release_file={self.distro_release_file!r}, include_lsb={self.include_lsb!r}, include_uname={self.include_uname!r}, include_oslevel={self.include_oslevel!r}, root_dir={self.root_dir!r}, _os_release_info={self._os_release_info!r}, _lsb_release_info={self._lsb_release_info!r}, _distro_release_info={self._distro_release_info!r}, _uname_info={self._uname_info!r}, _oslevel_info={self._oslevel_info!r})�rj)�formatr�s r�__repr__�LinuxDistribution.__repr__ s��
4�5;�F��F�4E�
	
rr3c���U(aUR5OUR5UR5URR	S5=(d UR54$)z�
Return information about the OS distribution that is compatible
with Python's :func:`platform.linux_distribution`, supporting a subset
of its parameters.

For details, see :func:`distro.linux_distribution`.
�release_codename)r@r r!�_os_release_info�getr$)rjr3s  rr<�$LinuxDistribution.linux_distribution1sJ��2�D�I�I�K�t�w�w�y��L�L�N��!�!�%�%�&8�9�L�T�]�]�_�
�	
rc�t�S[S[[[4S[4SjnURS5nU(a
U"U[5$UR	S5nU(a
U"U[
5$UR
S5nU(a
U"U[5$URS5nU(a
U"U[5$g)z_Return the distro ID of the OS distribution, as a string.

For details, see :func:`distro.id`.
�	distro_id�tabler4c�d�UR5RSS5nURX5$)N� �_)�lower�replacer�)r�r�s  r�	normalize�'LinuxDistribution.id.<locals>.normalizeGs*��!���)�1�1�#�s�;�I��9�9�Y�2�2rr �distributor_idr)	rrr[�NORMALIZED_OS_IDr^�NORMALIZED_LSB_IDr`�NORMALIZED_DISTRO_IDrb)rjr�r�s   rr �LinuxDistribution.idAs���	3��	3�T�#�s�(�^�	3��	3��(�(��.�	���Y�(8�9�9��)�)�*:�;�	���Y�(9�:�:��,�,�T�2�	���Y�(<�=�=��O�O�D�)�	���Y�(<�=�=�rr>c���URS5=(dA URS5=(d) URS5=(d URS5nU(avURS5=(d URS5nU(dFURS5=(d URS5nUR	SS9nU(aUSU3nU=(d S$)	z]
Return the name of the OS distribution, as a string.

For details, see :func:`distro.name`.
r@r��pretty_name�descriptionTrAr�r)r[r^r`rbr!)rjr>r@r!s    rr@�LinuxDistribution.name]s���
� � ��(�
'��$�$�%5�6�
'��'�'��/�
'����v�&�		
���'�'�
�6��$�:O�:O��;�D���/�/��7�R�4�?�?�6�;R���,�,�d�,�3���"�V�1�W�I�.�D��z�r�rrBc	��URS5URS5URS5URURS55R	SS5URURS55R	SS5URS5/nURS5R
S5(a!URSUR55 OQUR5S	:Xd"S	UR5R5;aURUR5 SnU(a8UH1nURS
5URS
5:�dUS:XdM/UnM3 OUH
nUS:wdMUn O U(a2U(a+UR5(aUSUR5S3nU$)
zc
Return the version of the OS distribution, as a string.

For details, see :func:`distro.version`.
�
version_id�releaser�rr�r �aixr�debian�.z (�))r[r^r`�_parse_distro_release_contentr�rb�
startswith�insert�oslevel_infor r#�split�append�_debian_version�countr$)rjr>rB�versionsr!�vs      rr!�LinuxDistribution.versionts��
� � ��.��!�!�)�,��$�$�\�2��.�.�t�/C�/C�M�/R�S�W�W��b�
�
�.�.��%�%�m�4�
��c�,��#��O�O�I�&�
���?�?�4� �+�+�E�2�2��O�O�A�t�0�0�2�3�
�W�W�Y�(�
"�h�$�)�)�+�2C�2C�2E�&E��O�O�D�0�0�1����
���7�7�3�<�'�-�-��"4�4��2�
��G������7��G����g�$�-�-�/�/� �	��D�M�M�O�#4�A�6�G��rc���URUS9nU(aW[R"S5nURU5nU(a)UR	5upVnXV=(d SU=(d S4$g)z{
Return the version of the OS distribution, as a tuple of version
numbers.

For details, see :func:`distro.version_parts`.
rFz(\d+)\.?(\d+)?\.?(\d+)?r)rrr)r!�re�compile�match�groups)rjrB�version_str�
version_regex�matchesrrrs        rr"�LinuxDistribution.version_parts�sa���l�l��l�-����J�J�'A�B�M�#�)�)�+�6�G��-4�^�^�-=�*��l��k�r�<�+=�2�=�=�rc�*�URU5S$)zn
Return the major version number of the current distribution.

For details, see :func:`distro.major_version`.
r�r"�rjrBs  rrH�LinuxDistribution.major_version�����!�!�$�'��*�*rc�*�URU5S$)zn
Return the minor version number of the current distribution.

For details, see :func:`distro.minor_version`.
�r�r�s  rrK�LinuxDistribution.minor_version�r�rc�*�URU5S$)ze
Return the build number of the current distribution.

For details, see :func:`distro.build_number`.
r6r�r�s  rr�LinuxDistribution.build_number�r�rc�6�URS5=(d S$)zk
Return the IDs of distributions that are like the OS distribution.

For details, see :func:`distro.like`.
�id_liker)r[r�s rr#�LinuxDistribution.like�s���#�#�I�.�4�"�4rc��URS$![a5 URS5=(d URS5=(d Ss$f=f)zX
Return the codename of the OS distribution.

For details, see :func:`distro.codename`.
r$r)r��KeyErrorr^r`r�s rr$�LinuxDistribution.codename�sW��		��(�(��4�4���	��%�%�j�1���+�+�J�7���
�	�s��<A�Ac��[UR5URX5[UR	U5URU5UR
U5S9UR5UR5S9$)zo
Return certain machine-readable information about the OS
distribution.

For details, see :func:`distro.info`.
)rrr)r r!r"r#r$)	rr r!rrHrKrr#r$)rjr>rBs   rrP�LinuxDistribution.info�sl����w�w�y��L�L��.�%��(�(��.��(�(��.�!�.�.�t�4��
�����]�]�_�

�
	
rc��UR$)z�
Return a dictionary containing key-value pairs for the information
items from the os-release file data source of the OS distribution.

For details, see :func:`distro.os_release_info`.
)r�r�s rrR�!LinuxDistribution.os_release_info�s���$�$�$rc��UR$)z�
Return a dictionary containing key-value pairs for the information
items from the lsb_release command data source of the OS
distribution.

For details, see :func:`distro.lsb_release_info`.
)�_lsb_release_infor�s rrT�"LinuxDistribution.lsb_release_info�s���%�%�%rc��UR$)z�
Return a dictionary containing key-value pairs for the information
items from the distro release file data source of the OS
distribution.

For details, see :func:`distro.distro_release_info`.
)�_distro_release_infor�s rrV�%LinuxDistribution.distro_release_infos���(�(�(rc��UR$)z�
Return a dictionary containing key-value pairs for the information
items from the uname command data source of the OS distribution.

For details, see :func:`distro.uname_info`.
)�_uname_infor�s rrX�LinuxDistribution.uname_infos�����rc��UR$)z%
Return AIX' oslevel command output.
)�
_oslevel_infor�s rr��LinuxDistribution.oslevel_infos���!�!�!rrYc�:�URRUS5$)z�
Return a single named information item from the os-release file data
source of the OS distribution.

For details, see :func:`distro.os_release_attr`.
r)r�r��rjrYs  rr[�!LinuxDistribution.os_release_attrs���$�$�(�(��B�7�7rc�:�URRUS5$)z�
Return a single named information item from the lsb_release command
output data source of the OS distribution.

For details, see :func:`distro.lsb_release_attr`.
r)r�r�r�s  rr^�"LinuxDistribution.lsb_release_attr's���%�%�)�)�)�R�8�8rc�:�URRUS5$)z�
Return a single named information item from the distro release file
data source of the OS distribution.

For details, see :func:`distro.distro_release_attr`.
r)r�r�r�s  rr`�%LinuxDistribution.distro_release_attr0s���(�(�,�,�Y��;�;rc�:�URRUS5$)z�
Return a single named information item from the uname command
output data source of the OS distribution.

For details, see :func:`distro.uname_attr`.
r)r�r�r�s  rrb�LinuxDistribution.uname_attr9s�����#�#�I�r�2�2rc���[RRUR5(a/[	URSS9nURU5sSSS5 $0$!,(df   0$=f)z|
Get the information items from the specified os-release file.

Returns:
    A dictionary containing all information items.
�utf-8��encodingN)r�r�r�rx�open�_parse_os_release_content)rj�release_files  rr��"LinuxDistribution._os_release_infoBsX���7�7�>�>�$�.�.�/�/��d�*�*�W�=���5�5�l�C�>�=��	�>�=��	�s�A � 
A/�linesc��0n[R"USS9nSUl[U5nUH1nSU;dMURSS5upVXaUR	5'M3 SU;aT[
R"SUS5nU(a3URS5=(d URS5nU=US'US	'S
U;a
US
US'U$SU;aUSUS'U$)a
Parse the lines of an os-release file.

Parameters:

* lines: Iterable through the lines in the os-release file.
         Each line must be a unicode string or a UTF-8 encoded byte
         string.

Returns:
    A dictionary containing all information items.
T)�posix�=r�r!z\((\D+)\)|,\s*(\D+)r6r$r��version_codename�ubuntu_codename)�shlex�whitespace_split�listr�r�r��search�group)	r��props�lexer�tokens�token�kr�r�r�s	         rr��+LinuxDistribution._parse_os_release_contentOs��������E��.��!%����e����E��e�|��{�{�3��*���#$�a�g�g�i� ������I�I�4�e�I�6F�G�E��#(�;�;�q�>�#C�U�[�[��^� �@P�P��j�!�E�*<�$=���&�
!&�&8� 9�E�*��
��	�%�
'� %�&7� 8�E�*���rc��UR(d0$Sn[R"U[RS9nUR
U5R5nURU5$![[R
4a 0s$f=f)z}
Get the information items from the lsb_release command output.

Returns:
    A dictionary containing all information items.
)�lsb_releasez-a��stderr)	rw�
subprocess�check_output�DEVNULL�OSError�CalledProcessError�_to_str�
splitlines�_parse_lsb_release_content�rj�cmd�stdout�contents    rr��#LinuxDistribution._lsb_release_info�s������I�	�'�C��,�,�S��9K�9K�L�F��,�,�v�&�1�1�3���.�.�w�7�7����6�6�7�	��I�	�s�%A*�*B	�B	c��0nUHxnURS5RSS5n[U5S:waM5UupEURUR	SS5R5UR505 Mz U$)a

Parse the output of the lsb_release command.

Parameters:

* lines: Iterable through the lines of the lsb_release output.
         Each line must be a unicode string or a UTF-8 encoded byte
         string.

Returns:
    A dictionary containing all information items.
�
�:r�r6r�r�)�stripr��len�updater�r�)r�r�line�kvrr�s      rr�,LinuxDistribution._parse_lsb_release_content�su�����D����D�!�'�'��Q�/�B��2�w�!�|���D�A��L�L�!�)�)�C��-�3�3�5�q�w�w�y�A�B�
��rc��UR(d0$Sn[R"U[RS9nURU5R
5nURU5$![a 0s$f=f)N)�unamez-rsr
)rzrr
rrrr�_parse_uname_contentrs    rr��LinuxDistribution._uname_info�sr���!�!��I�	�"�C��,�,�S��9K�9K�L�F��,�,�v�&�1�1�3���(�(��1�1���	��I�	�s�%A*�*A9�8A9c���UR(dg[R"S[RS9nUR
U5R5$![[R
4a gf=f)Nr�oslevelr
)r|rr
rrrrr)rjrs  rr��LinuxDistribution._oslevel_info�sd���#�#��	��,�,�Y�z�?Q�?Q�R�F��|�|�F�#�)�)�+�+����6�6�7�	��	�s�#A�A3�2A3c��[[RRURS5SS9nUR5R
5sSSS5 $!,(df   g=f![a gf=f)Nr1�asciir�r)r�r�r�r�r��readline�rstrip�FileNotFoundError)rj�fps  rr��!LinuxDistribution._debian_version�s`��	�������T�\�\�+;�<�w����{�{�}�+�+�-�����!�	��	�s.�2A-�A�	A-�
A*�&A-�*A-�-
A:�9A:c���U(d0$0n[R"SUSR55nU(a5UR5up4US:Xa0$UR	5US'X1S'XAS'U$)Nz^([^\s]+)\s+([\d\.]+)r�Linuxr r@r�)r�rrr�r�)r�rr�r@r!s     rr$�&LinuxDistribution._parse_uname_content�sl����I����	�	�2�E�!�H�N�N�4D�E���!�L�L�N�M�D�
�w���	��*�*�,�E�$�K� �&�M�&�)���r�
bytestringc�N�[R"5nURU5$rg)�sys�getfilesystemencoding�decode)r3r�s  rr�LinuxDistribution._to_str�s!���,�,�.��� � ��*�*rc	��UR(a[URUR5n[RR	UR5n[
R
U5nGO	[R"UR5Vs/sH_nU[;dM[RR[RRURU55(dM]UPMa nnUR5 UHfn[
R
U5nUcM[RRURU5nURU5nSU;aM`XPl O 0$UbURS5US'SUR!SS5R#5;aSUS'U$s snf![a	 [nN�f=f)z�
Get the information items from the specified distro release file.

Returns:
    A dictionary containing all information items.
r@r�r �
cloudlinuxr)ry�_parse_distro_release_filer�r��basename� _DISTRO_RELEASE_BASENAME_PATTERNr��listdirr�� _DISTRO_RELEASE_IGNORE_BASENAMESr�r��sortr�_DISTRO_RELEASE_BASENAMESrr�r�)rj�distro_infor<r��	basenames�filepaths      rr��&LinuxDistribution._distro_release_info�s����#�#��9�9�$�:R�:R�S�K��w�w�'�'��(@�(@�A�H�
5�:�:�8�D�E�
6�%'�J�J�t�|�|�$<��$<���'G�G�������r�w�w�|�|�D�L�L�(�'K�L��$<������ �&��8�>�>�x�H���=���7�7�<�<����h�?��"�=�=�h�G����,��+3�(��&��	��� %���A��K����;�?�?�6�2�6�<�<�>�>� ,�K������K���
6�
6�	�
6�s1�."F=�F8�"A
F8�0F8�6F=�8F=�=G�GrDc��[USS9nURUR55sSSS5 $!,(df   g=f![a 0s$f=f)z�
Parse a distro release file.

Parameters:

* filepath: Path name of the distro release file.

Returns:
    A dictionary containing all information items.
r�r�N)r�r�r+r)rjrDr.s   rr;�,LinuxDistribution._parse_distro_release_filesL��		��h��1�R��9�9�"�+�+�-�H�2�1�1���	��I�		�s*�
A�5�	A�
A�A�A�A�Arc��[RUR5SSS25n0nU(a|URS5SSS2US'URS5(aURS5SSS2US'URS5(aURS5SSS2US'U$U(aUR5US'U$)	z�
Parse a line from a distro release file.

Parameters:
* line: Line from the distro release file. Must be a unicode string
        or a UTF-8 encoded byte string.

Returns:
    A dictionary containing all information items.
N����r@r6r�r�r$)�(_DISTRO_RELEASE_CONTENT_REVERSED_PATTERNr�rr)rr�rBs   rr��/LinuxDistribution._parse_distro_release_content5s���;�@�@�����d�PR�d�AS�T�����")�-�-��"2�4�R�4�"8�K����}�}�Q���,3�M�M�!�,<�T�r�T�,B��L�)��}�}�Q���*1�-�-��*:�4�R�4�*@��J�'����"&�*�*�,�K����r)ryr�rwr|rzrxr{r�)NrrNNN�T�F�FF)4rrrrrtr�boolrrkr�r
r<r r@r!r"rHrKrr#r$rrPrrRrTrVrXr�r[r^r`rbrcr��staticmethodr	r�r�rrr�r�r�rr$�bytesrr�r;r�rrrrrvrv�s����&'+�!�#%�(,�"&�*.�C
��d�^�C
��C
�!�	C
�
 ��~�C
��3�-�
C
�"�$��C
�
�C
�J
�#�
�$.2�
�&*�
�	�s�C��}�	�
� �C��8�4��C��.(�d�(�$�(�3�(�T�$��5��c�3��3G�� +�$�+�3�+�+�$�+�3�+�+��+�#�+�5�c�5��#��"
�4�
�t�
��
�&%��c�3�h��%�&�$�s�C�x�.�&�)�T�#�s�(�^�)� �D��c��N� �"�c�"�8��8��8�9�#�9�#�9�<�S�<�S�<�3�C�3�C�3��
�$�s�C�x�.�
��
��/��/�D��c��N�/��/�b�8�4��S��>�8��8�$��(�3�-��D��c��N����.�	2�T�#�s�(�^�	2��	2��,�s�,��,���������H�S�M��d�3��8�n����$�+�E�+�c�+��+��8�d�3��8�n�8��8�t�3��4��S��>��,��C��D��c��N���rrvc� �[R"[5nUR[R5 UR[R"[R55 [R"SS9nURSSSSS9 URSS	[S
SS9 UR5nUR(a[S
S
S
URS9nO[ nUR"(a4UR%["R&"UR%5SSS95 gUR%SUR)SS95 UR+SS9nUR%SU5 UR-5nUR%SU5 g)NzOS distro info tool)r�z--jsonz-jz!Output in machine readable format�
store_true)�help�actionz
--root-dirz-rr{z5Path to the root filesystem directory (defaults to /))�type�destrUF)rwrzr|r{�T)�indent�	sort_keyszName: %srAzVersion: %szCodename: %s)�logging�	getLoggerr�setLevel�DEBUG�
addHandler�
StreamHandlerr5r�argparse�ArgumentParser�add_argumentr�
parse_argsr{rvr;�jsonrP�dumpsr@r!r$)�logger�parser�args�dist�distribution_version�distribution_codenames      r�mainrnRsC��
�
�
�x�
(�F�
�O�O�G�M�M�"�
���g�+�+�C�J�J�7�8�
�
$�
$�1F�
G�F�
����$�@���������
�
�
D�������D��}�}� ���!��]�]�	
�����y�y����D�J�J�t�y�y�{�1��E�F����J��	�	��	� 6�7�#�|�|�4�|�8�����M�#7�8� $�
�
������N�$9�:r�__main__rMrNrO)r4N)Brtrbrfr\r�r�r�rr5r8�typingrrrrrrr	r
rr�ImportError�dict�__version__rr�environr�r�r�r�r�r�r�r�rKr=rAr?rPrr<r r@r!r"rHrKrr#r$rPrRrTrVrXr[r^r`rb�	functoolsrcrvr;rnrrrr�<module>rvs�� 
����	�	���
��
�
�
�� �
���)���y���z�z�~�~�m�V�4���������<��#������'�"*�#)�$�#)��� 
�f���
,.�:�:�H�,�(�
$&�:�:�.L�#M� ���,���������
$� �(>�t�(>�u�S�#�s�]�?S�(>�VQ�C�Q�h$ ��$ �#�$ �N-)�D�-)��-)��-)�`'��'��s�C��}�)=�'�"
'��
'��
'�
'��
'��
'�
&�t�
&��
&��c��"�#��0)&��)&�T�)&�h�)&�X%��c�3�h��%�&�$�s�C�x�.�&�)�T�#�s�(�^�)� �D��c��N� �.�s�.�s�.�&/��/��/�(2�3�2�3�2�&)�#�)�#�)�"�)�&C�C�L�
��%;�P�z���F���I*���I���B��
�
��s#�G�,G&�G#�"G#�&G9�8G9

Filemanager

Name Type Size Permission Actions
__init__.cpython-313.pyc File 916 B 0644
__main__.cpython-313.pyc File 250 B 0644
distro.cpython-313.pyc File 50.88 KB 0644
Filemanager