Current File : //usr/lib/python3/dist-packages/uaclient/timer/__pycache__/update_messaging.cpython-312.pyc |
�
Uٵg� � �� � d Z ddlZddlZddlmZ ddlmZmZmZm Z m
Z
ddlmZ
ddlmZ ddlmZmZ ddlmZ dd lmZmZ d
ZdZ ej4 e
j6 e� � Zdefd
�Zdedefd�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)�_enabled_services)�ContractExpiryStatus�_is_attached)�UAConfig)�
machine_token�noticeszmotd-contract-statusz6/usr/lib/update-notifier/update-motd-updates-available�cfgc �� � t j | � }|j }|j di � j di � j dd � }t j | � }|j |j dd� |� }|j di � j di � j dd � }|�-||j k7 r||d d d<