File: //usr/lib/python3/dist-packages/uaclient/timer/__pycache__/update_messaging.cpython-310.pyc
o
nHJeD � @ s� d Z ddlZddlZddlmZ ddlmZmZmZm Z m
Z
ddlmZ
ddlmZ ddlmZ ddlmZmZ dd lmZ d
ZdZe�e
�e��Zdefd
d�Zdedefdd�Zdd� 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)�contract�defaults�messages�system�util)�_updates)�_is_attached)�UAConfig)�ESMAppsEntitlement�ESMInfraEntitlement)�ApplicationStatuszmotd-contract-statusz6/usr/lib/update-notifier/update-motd-updates-available�cfgc C s� | j }|�dd�}|�di ��di ��dd �}t�| �}|�||�}|�di ��di ��dd �}|d urJ|| jjkrL||d d d<