![]() Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : fdshops ( 1003) PHP Version : 8.2.21 Disable Function : NONE Directory : /lib/python2.7/site-packages/certbot/plugins/ |
� ���_c @ s� d Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z e j e � Z d e f d � � YZ d S( s Plugin storage class.i����N( t Any( t Dict( t errors( t filesystem( t ost PluginStoragec B sD e Z d Z d � Z d � Z d � Z d � Z d � Z d � Z RS( s4 Class implementing storage functionality for pluginsc C s1 | | _ | | _ t | _ d | _ d | _ d S( s� Initializes PluginStorage object storing required configuration options. :param .configuration.NamespaceConfig config: Configuration object :param str classkey: class name to use as root key in storage file N( t _configt _classkeyt Falset _initializedt Nonet _datat _storagepath( t selft configt classkey( ( s; /usr/lib/python2.7/site-packages/certbot/plugins/storage.pyt __init__ s c C s5 t j j | j j d � | _ | j � t | _ d S( sh Initializes PluginStorage data and reads current state from the disk if the storage json exists.s .pluginstorage.jsonN( R t patht joinR t config_dirR t _loadt TrueR ( R ( ( s; /usr/lib/python2.7/site-packages/certbot/plugins/storage.pyt _initialize_storage s c C s i } d } y+ t | j d � � } | j � } Wd QXWnb t k r� } d j | j t | � � } t j j | j � r� t j | � t j | � � q� n Xy t j | � } Wn[ t k r| s� t j d | j � q d j | j � } t j | � t j | � � n X| | _ d S( s� Reads PluginStorage content from the disk to a dict structure :raises .errors.PluginStorageError: when unable to open or read the file t t rNs1 Could not read PluginStorage data file: {0} : {1}s2 Plugin storage file %s was empty, no values loadeds$ PluginStorage file {0} is corrupted.( t openR t readt IOErrort formatt strR R t isfilet loggert errorR t PluginStorageErrort jsont loadst ValueErrort debugR ( R t datat filedatat fht et errmsg( ( s; /usr/lib/python2.7/site-packages/certbot/plugins/storage.pyR ( s, c C s+ | j s. d } t j | � t j | � � n y t j | j � } WnD t k r� } d j t | � � } t j | � t j | � � n XyO t j t j | j t j t j Bt j Bd � d � � } | j | � Wd QXWnJ t k r&} d j | j t | � � } t j | � t j | � � n Xd S( s� Saves PluginStorage content to disk :raises .errors.PluginStorageError: when unable to serialize the data or write it to the filesystem s; Unable to save, no values have been added to PluginStorage.s+ Could not serialize PluginStorage data: {0}i� t wNs4 Could not write PluginStorage data to file {0} : {1}( R R R R R! R"