mirror of
https://github.com/certbot/certbot.git
synced 2026-08-04 20:23:12 +02:00
pep8 compliance
This commit is contained in:
@@ -318,6 +318,7 @@ class AuthHandler(object):
|
|||||||
raise errors.LetsEncryptClientError(
|
raise errors.LetsEncryptClientError(
|
||||||
"Unimplemented Client Challenge: %s" % chall["type"])
|
"Unimplemented Client Challenge: %s" % chall["type"])
|
||||||
|
|
||||||
|
|
||||||
def gen_challenge_path(challenges, preferences, combos=None):
|
def gen_challenge_path(challenges, preferences, combos=None):
|
||||||
"""Generate a plan to get authority over the identity.
|
"""Generate a plan to get authority over the identity.
|
||||||
|
|
||||||
@@ -391,6 +392,7 @@ def _find_smart_path(challenges, preferences, combos):
|
|||||||
|
|
||||||
return best_combo
|
return best_combo
|
||||||
|
|
||||||
|
|
||||||
def _find_dumb_path(challenges, preferences):
|
def _find_dumb_path(challenges, preferences):
|
||||||
"""Find challenge path without server hints.
|
"""Find challenge path without server hints.
|
||||||
|
|
||||||
@@ -422,6 +424,7 @@ def _find_dumb_path(challenges, preferences):
|
|||||||
|
|
||||||
return [i for (i, _) in path]
|
return [i for (i, _) in path]
|
||||||
|
|
||||||
|
|
||||||
def is_preferred(offered_challenge_type, path):
|
def is_preferred(offered_challenge_type, path):
|
||||||
"""Return whether or not the challenge is preferred in path."""
|
"""Return whether or not the challenge is preferred in path."""
|
||||||
for _, challenge_type in path:
|
for _, challenge_type in path:
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ PopChall = collections.namedtuple("PopChall", "domain, alg, nonce, hints")
|
|||||||
# the response within a larger challenge list
|
# the response within a larger challenge list
|
||||||
IndexedChall = collections.namedtuple("IndexedChall", "chall, index")
|
IndexedChall = collections.namedtuple("IndexedChall", "chall, index")
|
||||||
|
|
||||||
|
|
||||||
# DVSNI Challenge functions
|
# DVSNI Challenge functions
|
||||||
def dvsni_gen_cert(filepath, name, r_b64, nonce, key):
|
def dvsni_gen_cert(filepath, name, r_b64, nonce, key):
|
||||||
"""Generate a DVSNI cert and save it to filepath.
|
"""Generate a DVSNI cert and save it to filepath.
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ from letsencrypt.client import errors
|
|||||||
from letsencrypt.client import interfaces
|
from letsencrypt.client import interfaces
|
||||||
from letsencrypt.client import recovery_token
|
from letsencrypt.client import recovery_token
|
||||||
|
|
||||||
|
|
||||||
class ClientAuthenticator(object):
|
class ClientAuthenticator(object):
|
||||||
"""IAuthenticator for CONFIG.CLIENT_CHALLENGES.
|
"""IAuthenticator for CONFIG.CLIENT_CHALLENGES.
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,6 @@ class TwoVhost80Test(unittest.TestCase):
|
|||||||
"""Test two standard well configured HTTP vhosts."""
|
"""Test two standard well configured HTTP vhosts."""
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
#zope.component.provideUtility(display.NcursesDisplay())
|
|
||||||
|
|
||||||
self.temp_dir, self.config_dir, self.work_dir = config_util.dir_setup(
|
self.temp_dir, self.config_dir, self.work_dir = config_util.dir_setup(
|
||||||
"debian_apache_2_4/two_vhost_80")
|
"debian_apache_2_4/two_vhost_80")
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ class DvsniPerformTest(unittest.TestCase):
|
|||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
from letsencrypt.client.apache import dvsni
|
from letsencrypt.client.apache import dvsni
|
||||||
#zope.component.provideUtility(display.NcursesDisplay())
|
|
||||||
|
|
||||||
self.temp_dir, self.config_dir, self.work_dir = config_util.dir_setup(
|
self.temp_dir, self.config_dir, self.work_dir = config_util.dir_setup(
|
||||||
"debian_apache_2_4/two_vhost_80")
|
"debian_apache_2_4/two_vhost_80")
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
"""Test the helper objects in apache.obj.py."""
|
"""Test the helper objects in apache.obj.py."""
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
|
||||||
class AddrTest(unittest.TestCase):
|
class AddrTest(unittest.TestCase):
|
||||||
"""Test the Addr class."""
|
"""Test the Addr class."""
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|||||||
@@ -363,6 +363,7 @@ class GetAuthorizationsTest(unittest.TestCase):
|
|||||||
self.assertFalse(self.handler.paths)
|
self.assertFalse(self.handler.paths)
|
||||||
self.assertFalse(self.handler.domains)
|
self.assertFalse(self.handler.domains)
|
||||||
|
|
||||||
|
|
||||||
# pylint: disable=protected-access
|
# pylint: disable=protected-access
|
||||||
class PathSatisfiedTest(unittest.TestCase):
|
class PathSatisfiedTest(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
@@ -411,6 +412,7 @@ def gen_auth_resp(chall_list):
|
|||||||
return ["%s%s" % (type(chall).__name__, chall.domain)
|
return ["%s%s" % (type(chall).__name__, chall.domain)
|
||||||
for chall in chall_list]
|
for chall in chall_list]
|
||||||
|
|
||||||
|
|
||||||
def gen_path(str_list, challenges):
|
def gen_path(str_list, challenges):
|
||||||
path = []
|
path = []
|
||||||
for i, chall in enumerate(challenges):
|
for i, chall in enumerate(challenges):
|
||||||
|
|||||||
Reference in New Issue
Block a user