Файловый менеджер - Редактировать - /usr/lib/python3.9/site-packages/glances/__pycache__/outdated.cpython-39.pyc
Назад
a ���c� � @ s� d Z ddlmZmZ ddlZddlZddlZddlZddlmZ ddl m Z ddlmZm Z mZmZ ddlmZ ddlmZ dd lmZ zdd lmZ dZW n8 ey� Z z e�d�e�� d ZW Y dZ[n dZ[0 0 dZG dd� de�ZdS )zManage Glances update.� )�datetime� timedeltaN)�CertificateError)�__version__)� nativestr�urlopen� HTTPError�URLError)�user_cache_dir)� safe_makedirs)�logger)�VersionTzKUnable to import 'packaging' module ({}). Glances cannot check for updates.Fz)https://pypi.python.org/pypi/Glances/jsonc @ s` e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dd� Z dd� Zdd� Zdd� Z dS )�Outdatedz� This class aims at providing methods to warn the user when a new Glances version is available on the PyPI repository (https://pypi.python.org/pypi/Glances/). c C sp || _ || _t� | _tj�| jd�| _tdt � � d�| _| �|� t sNd| j _t�d�| j j �� | �� dS )zInit the Outdated classzglances-version.dbz0.0)�installed_version�latest_version�refresh_dateTz$Check Glances version up-to-date: {}N)�args�configr � cache_dir�os�path�join� cache_filer r �now�data�load_config�PACKAGING_IMPORT�disable_check_updater �debug�format�get_pypi_version)�selfr r � r"