"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "certbot/configuration.py" between
certbot-0.30.2.tar.gz and certbot-0.31.0.tar.gz

About: Certbot is EFF’s tool to obtain certs from Let’s Encrypt, and optionally auto-enable HTTPS on your server. It can also act as a client for any other CA that uses the ACME protocol.

configuration.py  (certbot-0.30.2):configuration.py  (certbot-0.31.0)
"""Certbot user-supplied configuration.""" """Certbot user-supplied configuration."""
import copy import copy
import os import os
from six.moves.urllib import parse # pylint: disable=import-error from six.moves.urllib import parse # pylint: disable=import-error
import zope.interface import zope.interface
from certbot import compat
from certbot import constants from certbot import constants
from certbot import errors from certbot import errors
from certbot import interfaces from certbot import interfaces
from certbot import util from certbot import util
@zope.interface.implementer(interfaces.IConfig) @zope.interface.implementer(interfaces.IConfig)
class NamespaceConfig(object): class NamespaceConfig(object):
"""Configuration wrapper around :class:`argparse.Namespace`. """Configuration wrapper around :class:`argparse.Namespace`.
For more documentation, including available attributes, please see For more documentation, including available attributes, please see
skipping to change at line 71 skipping to change at line 72
"""File path based on ``server``.""" """File path based on ``server``."""
parsed = parse.urlparse(self.namespace.server) parsed = parse.urlparse(self.namespace.server)
return (parsed.netloc + parsed.path).replace('/', os.path.sep) return (parsed.netloc + parsed.path).replace('/', os.path.sep)
@property @property
def accounts_dir(self): # pylint: disable=missing-docstring def accounts_dir(self): # pylint: disable=missing-docstring
return self.accounts_dir_for_server_path(self.server_path) return self.accounts_dir_for_server_path(self.server_path)
def accounts_dir_for_server_path(self, server_path): def accounts_dir_for_server_path(self, server_path):
"""Path to accounts directory based on server_path""" """Path to accounts directory based on server_path"""
server_path = compat.underscores_for_unsupported_characters_in_path(serv er_path)
return os.path.join( return os.path.join(
self.namespace.config_dir, constants.ACCOUNTS_DIR, server_path) self.namespace.config_dir, constants.ACCOUNTS_DIR, server_path)
@property @property
def backup_dir(self): # pylint: disable=missing-docstring def backup_dir(self): # pylint: disable=missing-docstring
return os.path.join(self.namespace.work_dir, constants.BACKUP_DIR) return os.path.join(self.namespace.work_dir, constants.BACKUP_DIR)
@property @property
def csr_dir(self): # pylint: disable=missing-docstring def csr_dir(self): # pylint: disable=missing-docstring
return os.path.join(self.namespace.config_dir, constants.CSR_DIR) return os.path.join(self.namespace.config_dir, constants.CSR_DIR)
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)