File: //usr/lib/python3/dist-packages/uaclient/timer/__pycache__/update_messaging.cpython-310.pyc
o
��Jh� � @ s� d Z ddlZddlZddlmZ ddlmZmZmZm Z m
Z
ddlmZ
ddlmZ ddlmZmZ ddlmZ dd lmZmZ d
ZdZe�e
�e��Zdefd
d�Zdedefdd�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)�contract�defaults�messages�system�util)�_updates)�_enabled_services)�ContractExpiryStatus�_is_attached)�UAConfig)�
machine_token�noticeszmotd-contract-statusz6/usr/lib/update-notifier/update-motd-updates-available�cfgc C s� t �| �}|j }|�di ��di ��dd �}t�| �}|�|�dd�|�}|�di ��di ��dd �}|d urK||jkrM||d d d<