✏️ 编辑:up2dateUtils.cpython-39.opt-1.pyc
路径:
/usr/lib/python3.9/site-packages/up2date_client/__pycache__/up2dateUtils.cpython-39.opt-1.pyc
大小:1.51 KB · 修改:2026-07-29 13:47:30 · 权限:0644 · 只读(保存会失败)
← 返回目录
👁 查看
⬇ 下载
检测到二进制内容,直接保存可能损坏文件。请改用「上传替换」。
a rjj� � @ 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.6-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
💾 保存
取消
保存为 UTF-8,换行统一为 LF