File manager - Edit - /usr/lib/python3/dist-packages/uaclient/timer/__pycache__/update_messaging.cpython-310.pyc
Back
o =�xd� � @ s� d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z m Z mZmZ ddl mZ ddlmZ ddlmZ dd lmZmZ dd lmZ dZdZejG d d� dej��Zdefdd�Zdedeeef fdd�Z dede!fdd�Z"dd� Z#dS )a% Update messaging text for use in MOTD and APT custom Ubuntu Pro messages. Messaging files will be emitted to /var/lib/ubuntu-advantage/message-* which will be sourced by apt-hook/hook.cc and various /etc/update-motd.d/ hooks to present updated text about Ubuntu Pro service and token state. � N)�exists)�Tuple)�contract�defaults�messages�system)�_updates)�_is_attached)�UAConfig)�ESMAppsEntitlement�ESMInfraEntitlement)�ApplicationStatuszmotd-contract-statusz6/usr/lib/update-notifier/update-motd-updates-availablec @ s e Zd ZdZdZdZdZdZdS )�ContractExpiryStatusr � � � � N)�__name__� __module__�__qualname__�NONE�ACTIVE�ACTIVE_EXPIRED_SOON�EXPIRED_GRACE_PERIOD�EXPIRED� r r �A/usr/lib/python3/dist-packages/uaclient/timer/update_messaging.pyr s r �cfgc C s� | j }|�dd�}|�di ��di ��dd �}t�| �}|�||�}|�di ��di ��dd �}|d urJ|| jjkrL||d d d<