File: //lib/python3/dist-packages/uaclient/timer/__pycache__/update_messaging.cpython-312.pyc
�
�Hcf� � � � d Z ddlZddlZddlmZ ddlmZmZmZm Z m
Z
ddlmZ
ddlmZmZ ddlmZ ddlmZmZ dd lmZ dd
lmZ dZdZ ej8 e
j: e� � Zd
efd�Z d
ede!fd�Z"d� Z#y)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)�contract�defaults�messages�system�util)�_updates)�ContractExpiryStatus�_is_attached)�UAConfig)�ESMAppsEntitlement�ESMInfraEntitlement)�ApplicationStatus)�noticeszmotd-contract-statusz6/usr/lib/update-notifier/update-motd-updates-available�cfgc �� � | j }|j dd� }|j di � j di � j dd � }t j | � }|j ||� }|j di � j di � j dd � }|�A|| j
j k7 r'||d d d<