/
lib
/
python3.9
/
site-packages
/
up2date_client
/
__pycache__
/
up file
home
a Z�i� � @ 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)�fallback�ugettextc C s6 t �� } | d rt| d �S t� dkr.t�� S t�� S )z3 Returns the version of redhat-release rpm ZversionOverride�deb)r ZinitUp2dateConfig�strr �distroZcodename� major_version)Zcfg� r �?/usr/lib/python3.9/site-packages/up2date_client/up2dateUtils.py� getVersion s r c C s t � dkrdS dS )z( Returns the name of the system r ZUbuntuZ CloudLinuxr r r r r �getOSRelease# s r c C sz t �dt j�r@tdd�} | �� �� }ddi}||v r<|| }|S t �� d }t� dkrv|dv rbd}|d krnd }|d7 }|S )Nz/etc/rpm/platform�rzia32e-redhat-linuxzx86_64-redhat-linux� r )Zi486Zi586Zi686Zi386Zx86_64Zamd64z -debian-linux)�os�access�R_OK�open�read�strip�unamer )�fd�platform�replaceZarchr r r �getArch, s r c C s dS )Nz3.0.3-1.el9.cloudlinuxr r r r r �versionA s r )�__doc__r �gettextr Zup2date_clientr Zup2date_client.pkgplatformr �translation�t�hasattrr �_r r r r r r r r �<module> s