AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/uaclient/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /lib/python3/dist-packages/uaclient/__pycache__/version.cpython-310.pyc
o


/�c>�@s�dZddlZddlZddlmZddlmZddlm	Z	m
Z
mZddlm
Z
mZddlmZddlmZd	Zd
ZdZdefd
d�Zdeefdd�Zdeefdd�ZdS)z"
Client version related functions
�N)�inf)�Optional)�compare_versions� get_apt_cache_policy_for_package�get_apt_cache_time)�CANDIDATE_CACHE_PATH�UAC_RUN_PATH)�ProcessExecutionError)�subpz27.13.5z27.13.5~22.04.1zCandidate: (?P<candidate>.*?)\n�returncCspt�d�stStj�tj�t��}tj�tj�|d��r6gd�}zt|�\}}|�	�WSt
y5YtSwtS)aOReturn the packaged version as a string

    Prefer the binary PACKAGED_VESION set by debian/rules to DEB_VERSION.
    If unavailable, check for a .git development environments:
      a. If run in our upstream repo `git describe` will gives a leading
         XX.Y so return the --long version to allow daily build recipes
         to count commit offset from upstream's XX.Y signed tag.
      b. If run in a git-ubuntu pkg repo, upstream tags aren't visible,
         believe __VERSION__ is correct - there is and MUST always be a
         test to make sure it matches debian/changelog
    z@@PACKAGED_VERSIONz.git)�git�describez
--abbrev=8z--match=[0-9]*z--long)�PACKAGED_VERSION�
startswith�os�path�dirname�__file__�exists�joinr
�stripr	�__VERSION__)�topdir�cmd�out�_�r�2/usr/lib/python3/dist-packages/uaclient/version.py�get_versions

�rcCst�pt}tj�t�rt�t�j|kr`d}z9td�}t	�
t|�}|rM|�d�}tj
tdd�ttd��}|�|�Wd�|WS1sEwY|WSWnty_|dur]|YSYnwzttd��}|����Wd�WS1sxwYWdSty�YdSw)Nzubuntu-advantage-tools�	candidateT)�exist_ok�w�r)rrrrrr�stat�st_mtimer�re�search�CANDIDATE_REGEX�group�makedirsr�open�write�	Exception�readr)�last_apt_cache_update�candidate_version�policy�match�frrr�get_last_known_candidate1sB

��

�����
$���r3cCs t�}|rt|t�d�r|SdS)N�gt)r3rr)rrrr�check_for_new_versionPsr5)�__doc__�os.pathrr%�mathr�typingr�uaclient.aptrrr�uaclient.defaultsrr�uaclient.exceptionsr	�uaclient.systemr
rrr'�strrr3r5rrrr�<module>s

Anon7 - 2022
AnonSec Team