�
���_c @ s� d Z d d l Z d d l m 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
d d l m Z e j j e j � d
e f d � � Y� Z d � Z d S(
s$ Certbot user-supplied configuration.i����N( t parse( t errors( t
interfaces( t util( t constants( t misc( t ost NamespaceConfigc B s
e Z d Z d � Z d � Z d � Z e d � � Z e d � � Z d � Z e d � � Z
e d � � Z e d � � Z e d
� � Z
e d � � Z d � Z e d
� � Z e d � � Z e d � � Z e d � � Z e d � � Z e d � � Z e d � � Z RS( s� Configuration wrapper around :class:`argparse.Namespace`.
For more documentation, including available attributes, please see
:class:`certbot.interfaces.IConfig`. However, note that
the following attributes are dynamically resolved using
:attr:`~certbot.interfaces.IConfig.work_dir` and relative
paths defined in :py:mod:`certbot._internal.constants`:
- `accounts_dir`
- `csr_dir`
- `in_progress_dir`
- `key_dir`
- `temp_checkpoint_dir`
And the following paths are dynamically resolved using
:attr:`~certbot.interfaces.IConfig.config_dir` and relative
paths defined in :py:mod:`certbot._internal.constants`:
- `default_archive_dir`
- `live_dir`
- `renewal_configs_dir`
:ivar namespace: Namespace typically produced by
:meth:`argparse.ArgumentParser.parse_args`.
:type namespace: :class:`argparse.Namespace`
c C s{ t j | d | � t j j | j j � | j _ t j j | j j � | j _ t j j | j j � | j _ t | � d S( Nt namespace(
t objectt __setattr__R t patht abspathR t
config_dirt work_dirt logs_dirt check_config_sanity( t selfR ( ( sC /usr/lib/python2.7/site-packages/certbot/_internal/configuration.pyt __init__- s
c C s t | j | � S( N( t getattrR ( R t name( ( sC /usr/lib/python2.7/site-packages/certbot/_internal/configuration.pyt __getattr__7 s c C s t | j | | � d S( N( t setattrR ( R R t value( ( sC /usr/lib/python2.7/site-packages/certbot/_internal/configuration.pyR
: s c C s5 t j | j j � } | j | j j d t j j � S( s File path based on ``server``.t /( R t urlparseR t servert netlocR t replaceR t sep( R t parsed( ( sC /usr/lib/python2.7/site-packages/certbot/_internal/configuration.pyt server_path= s c C s | j | j � S( N( t accounts_dir_for_server_pathR ( R ( ( sC /usr/lib/python2.7/site-packages/certbot/_internal/configuration.pyt accounts_dirC s c C s. t j | � } t j j | j j t j | � S( s/ Path to accounts directory based on server_path( R t. underscores_for_unsupported_characters_in_pathR R t joinR R
R t ACCOUNTS_DIR( R R ( ( sC /usr/lib/python2.7/site-packages/certbot/_internal/configuration.pyR G s c C s t j j | j j t j � S( N( R R R# R R R t
BACKUP_DIR( R ( ( sC /usr/lib/python2.7/site-packages/certbot/_internal/configuration.pyt
backup_dirM s c C s t j j | j j t j � S( N( R R R# R R
R t CSR_DIR( R ( ( sC /usr/lib/python2.7/site-packages/certbot/_internal/configuration.pyt csr_dirQ s c C s t j j | j j t j � S( N( R R R# R R R t IN_PROGRESS_DIR( R ( ( sC /usr/lib/python2.7/site-packages/certbot/_internal/configuration.pyt in_progress_dirU s c C s t j j | j j t j � S( N( R R R# R R
R t KEY_DIR( R ( ( sC /usr/lib/python2.7/site-packages/certbot/_internal/configuration.pyt key_dirY s c C s t j j | j j t j � S( N( R R R# R R R t TEMP_CHECKPOINT_DIR( R ( ( sC /usr/lib/python2.7/site-packages/certbot/_internal/configuration.pyt temp_checkpoint_dir] s c C s"