| Server IP : 46.245.81.90 / Your IP : 216.73.216.85 Web Server : Apache System : Linux server3ir.xdlhost.com 4.18.0-553.30.1.lve.el8.x86_64 #1 SMP Tue Dec 3 01:21:19 UTC 2024 x86_64 User : gmparts ( 1037) PHP Version : 8.1.34 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3.6/site-packages/up2date_client/__pycache__/ |
Upload File : |
3
�y=j� � @ s~ d Z ddlZddlZddlZddlmZ ddlmZ ejddd�Z e
e d�sTe je _e jZd d
� Z
dd� Zd
d� Zdd� ZdS )zutility functions for up2date� N)�config)�getPlatformzrhn-client-toolsT)Zfallback�ugettextc C s6 t j� } | d rt| d �S t� dkr.tj� S tj� S )z3
Returns the version of redhat-release rpm
ZversionOverride�deb)r ZinitUp2dateConfig�strr �distroZcodenameZ
major_version)Zcfg� r �"/usr/lib/python3.6/up2dateUtils.py�
getVersion s
r
c C s t � dkrdS dS )z(
Returns the name of the system
r ZUbuntuZ
CloudLinux)r r r r r �getOSRelease# s
r c C sz t jdt j�r@tdd�} | j� j� }ddi}||kr<|| }|S t j� d }t� dkrv|dkrbd
}|dkrnd}|d
7 }|S )Nz/etc/rpm/platform�rzia32e-redhat-linuxzx86_64-redhat-linux� r �i486�i586�i686Zi386Zx86_64�amd64z
-debian-linux)r r r )�os�access�R_OK�open�read�strip�unamer )�fd�platform�replaceZarchr r r �getArch, s
r c C s dS )Nz03.0.5-1.module_el8.10.0+7087+bd4dfabe.cloudlinuxr r r r r �versionA s r )�__doc__r �gettextr Zup2date_clientr Zup2date_client.pkgplatformr Ztranslation�t�hasattrr �_r
r r r r r r r �<module> s