Current File : //lib/python3.6/site-packages/up2date_client/__pycache__/up2dateUtils.cpython-36.pyc
3

��*j��@s~dZddlZddlZddlZddlmZddlmZejddd�Z	e
e	d�sTe	je	_e	jZd	d
�Z
dd�Zd
d�Zdd�ZdS)zutility functions for up2date�N)�config)�getPlatformzrhn-client-toolsT)Zfallback�ugettextcCs6tj�}|drt|d�St�dkr.tj�Stj�S)z3
    Returns the version of redhat-release rpm
    ZversionOverride�deb)rZinitUp2dateConfig�strr�distroZcodenameZ
major_version)Zcfg�r�"/usr/lib/python3.6/up2dateUtils.py�
getVersions
r
cCst�dkrdSdS)z(
    Returns the name of the system
    rZUbuntuZ
CloudLinux)rrrrr	�getOSRelease#s
rcCsztjdtj�r@tdd�}|j�j�}ddi}||kr<||}|Stj�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)rrr)�os�access�R_OK�open�read�strip�unamer)�fd�platform�replaceZarchrrr	�getArch,s

rcCsdS)Nz03.0.3-2.module_el8.10.0+7072+83ec8341.cloudlinuxrrrrr	�versionAsr)�__doc__r�gettextrZup2date_clientrZup2date_client.pkgplatformrZtranslation�t�hasattrr�_r
rrrrrrr	�<module>s