Spamworldpro Mini Shell
Spamworldpro


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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/certbot/plugins/storage.pyc
�
���_c@s�dZddlZddlZddlmZddlmZddlmZddlm	Z	ddlm
Z
eje�Z
defd	��YZdS(
sPlugin storage class.i����N(tAny(tDict(terrors(t
filesystem(tost
PluginStoragecBsDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(s4Class implementing storage functionality for pluginscCs1||_||_t|_d|_d|_dS(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	_classkeytFalset_initializedtNonet_datat_storagepath(tselftconfigtclasskey((s;/usr/lib/python2.7/site-packages/certbot/plugins/storage.pyt__init__s
					cCs5tjj|jjd�|_|j�t|_dS(shInitializes PluginStorage data and reads current state from the disk
        if the storage json exists.s.pluginstorage.jsonN(	RtpathtjoinRt
config_dirRt_loadtTrueR	(R
((s;/usr/lib/python2.7/site-packages/certbot/plugins/storage.pyt_initialize_storage s
cCsi}d}y+t|jd��}|j�}WdQXWnbtk
r�}dj|jt|��}tjj|j�r�t	j
|�tj|��q�nXyt
j|�}Wn[tk
r|s�t	jd|j�q
dj|j�}t	j
|�tj|��nX||_dS(s�Reads PluginStorage content from the disk to a dict structure

        :raises .errors.PluginStorageError: when unable to open or read the file
        ttrNs1Could not read PluginStorage data file: {0} : {1}s2Plugin storage file %s was empty, no values loadeds$PluginStorage file {0} is corrupted.(topenRtreadtIOErrortformattstrRRtisfiletloggerterrorRtPluginStorageErrortjsontloadst
ValueErrortdebugR(R
tdatatfiledatatfhteterrmsg((s;/usr/lib/python2.7/site-packages/certbot/plugins/storage.pyR(s,

	

cCs+|js.d}tj|�tj|��nytj|j�}WnDtk
r�}dj	t
|��}tj|�tj|��nXyOtjt
j|jtjtjBtjBd�d��}|j|�WdQXWnJtk
r&}dj	|jt
|��}tj|�tj|��nXdS(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�twNs4Could not write PluginStorage data to file {0} : {1}(R	RR RR!R"tdumpsRt	TypeErrorRRRtfdopenRRRtO_WRONLYtO_CREATtO_TRUNCtwriteR(R
R*t
serializedR)R(((s;/usr/lib/python2.7/site-packages/certbot/plugins/storage.pytsaveFs,	


cCsS|js|j�n|j|jkr;i|j|j<n||j|j|<dS(s�Put configuration value to PluginStorage

        :param str key: Key to store the value to
        :param value: Data to store
        N(R	RRR(R
tkeytvalue((s;/usr/lib/python2.7/site-packages/certbot/plugins/storage.pytputds
	
cCs(|js|j�n|j|j|S(s�Get configuration value from PluginStorage

        :param str key: Key to get value from the storage

        :raises KeyError: If the key doesn't exist in the storage
        (R	RRR(R
R5((s;/usr/lib/python2.7/site-packages/certbot/plugins/storage.pytfetchqs	
(	t__name__t
__module__t__doc__RRRR4R7R8(((s;/usr/lib/python2.7/site-packages/certbot/plugins/storage.pyRs					
(R;R"tloggingtacme.magic_typingRRtcertbotRtcertbot.compatRRt	getLoggerR9RtobjectR(((s;/usr/lib/python2.7/site-packages/certbot/plugins/storage.pyt<module>s

Spamworldpro Mini