File: //usr/lib/python3/dist-packages/certbot/_internal/__pycache__/updater.cpython-310.pyc
o
6��a� � @ sr d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z e�
e�Zdd� Z
d d
� Zdd� Zd
d� Zdd� ZdS )zUpdaters run at renewal� N)�errors)�
interfaces)� selection)�enhancementsc
C s~ | j r
t�d� dS zt�| |�}W n tjy, } z
t�d|� W Y d}~dS d}~ww |r=t||| � t ||| � dS dS )as Run updaters that the plugin supports
:param config: Configuration object
:type config: certbot.configuration.NamespaceConfig
:param lineage: Certificate lineage object
:type lineage: storage.RenewableCert
:param plugins: List of plugins
:type plugins: certbot._internal.plugins.disco.PluginsRegistry
:returns: `None`
:rtype: None
z"Skipping updaters in dry-run mode.Nz4Could not choose appropriate plugin for updaters: %s)
�dry_run�logger�debug�plug_sel�get_unprepared_installerr �Error�error�
_run_updaters�_run_enhancement_updaters)�config�lineage�plugins� installer�e� r �;/usr/lib/python3/dist-packages/certbot/_internal/updater.py�run_generic_updaters s
���r c C s@ | j r
t�d� dS | jst|tj�r|�|� t||| � dS )a� Helper function to run deployer interface method if supported by the used
installer plugin.
:param config: Configuration object
:type config: certbot.configuration.NamespaceConfig
:param lineage: Certificate lineage object
:type lineage: storage.RenewableCert
:param installer: Installer object
:type installer: interfaces.Installer
:returns: `None`
:rtype: None
z*Skipping renewal deployer in dry-run mode.N) r r r �disable_renew_updates�
isinstancer �
RenewDeployer�renew_deploy�_run_enhancement_deployers)r r r r r r �run_renewal_deployer&