mirror of
https://github.com/certbot/certbot.git
synced 2026-06-07 15:52:08 -04:00
Respond to review feedback.
This commit is contained in:
parent
cd52fc02b9
commit
f0cfd69cdc
5 changed files with 12 additions and 11 deletions
|
|
@ -164,7 +164,7 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
|
|||
temp_install(self.mod_ssl_conf)
|
||||
|
||||
def deploy_cert(self, domain, cert_path, key_path,
|
||||
chain_path=None, fullchain_path=None): # pylint: disable=unused-argument
|
||||
chain_path=None, fullchain_path=None): # pylint: disable=unused-argument
|
||||
"""Deploys certificate to specified virtual host.
|
||||
|
||||
Currently tries to find the last directives to deploy the cert in
|
||||
|
|
|
|||
|
|
@ -149,13 +149,13 @@ class NginxConfigurator(common.Plugin):
|
|||
|
||||
try:
|
||||
self.parser.add_server_directives(vhost.filep, vhost.names,
|
||||
cert_directives, True)
|
||||
cert_directives, replace=True)
|
||||
self.parser.add_server_directives(vhost.filep, vhost.names,
|
||||
stapling_directives, False)
|
||||
stapling_directives, replace=False)
|
||||
logger.info("Deployed Certificate to VirtualHost %s for %s",
|
||||
vhost.filep, vhost.names)
|
||||
except errors.MisconfigurationError, e:
|
||||
logger.debug(e)
|
||||
except errors.MisconfigurationError as error:
|
||||
logger.debug(error)
|
||||
logger.warn(
|
||||
"Cannot find a cert or key directive in %s for %s. "
|
||||
"VirtualHost was not modified.", vhost.filep, vhost.names)
|
||||
|
|
|
|||
|
|
@ -96,11 +96,10 @@ class NginxDvsni(common.Dvsni):
|
|||
bucket_directive = ['server_names_hash_bucket_size', '128']
|
||||
|
||||
main = self.configurator.parser.parsed[root]
|
||||
for key, value in main:
|
||||
for key, body in main:
|
||||
if key == ['http']:
|
||||
body = value
|
||||
found_bucket = False
|
||||
for key, value in body: # pylint: disable=unused-variable
|
||||
for key, _ in body:
|
||||
if key == bucket_directive[0]:
|
||||
found_bucket = True
|
||||
if not found_bucket:
|
||||
|
|
|
|||
|
|
@ -86,12 +86,14 @@ def filter_comments(tree):
|
|||
|
||||
return list(traverse(tree))
|
||||
|
||||
|
||||
def contains_at_depth(haystack, needle, n):
|
||||
"""
|
||||
"""Is the needle in haystack at depth n?
|
||||
|
||||
Return true if the needle is present in one of the sub-iterables in haystack
|
||||
at depth n. Haystack must be an iterable.
|
||||
"""
|
||||
if not hasattr(haystack, '__iter__'):
|
||||
if not isinstance(haystack, collections.Iterable):
|
||||
return False
|
||||
if n == 0:
|
||||
return needle in haystack
|
||||
|
|
|
|||
|
|
@ -38,5 +38,5 @@ if ! go get bitbucket.org/liamstask/goose/cmd/goose ; then
|
|||
exit 1
|
||||
fi
|
||||
./test/create_db.sh
|
||||
./start.py > /dev/null &
|
||||
./start.py &
|
||||
# Hopefully start.py bootstraps before integration test is started...
|
||||
|
|
|
|||
Loading…
Reference in a new issue