diff --git a/letsencrypt/cli.py b/letsencrypt/cli.py index 0bab6d034..9c4c4a5f5 100644 --- a/letsencrypt/cli.py +++ b/letsencrypt/cli.py @@ -1036,7 +1036,7 @@ def _plugins_parsing(helpful, plugins): # "webroot" topic helpful.add("webroot", "-w", "--webroot-path", action=WebrootPathProcessor, help="public_html / webroot path") - parse_dict = lambda s : dict(json.loads(s)) + parse_dict = lambda s: dict(json.loads(s)) helpful.add("webroot", "--webroot-map", default={}, type=parse_dict, help="Mapping from domains to webroot paths") @@ -1068,7 +1068,7 @@ class DomainFlagProcessor(argparse.Action): # pylint: disable=missing-docstring if not config.domains: config.domains = [] - for d in map(string.strip, domain_arg.split(",")): + for d in map(string.strip, domain_arg.split(",")): # pylint: disable=bad-builtin if d not in config.domains: config.domains.append(d) # Each domain has a webroot_path of the most recent -w flag diff --git a/letsencrypt/plugins/webroot_test.py b/letsencrypt/plugins/webroot_test.py index 261293005..902f74e9f 100644 --- a/letsencrypt/plugins/webroot_test.py +++ b/letsencrypt/plugins/webroot_test.py @@ -32,7 +32,7 @@ class AuthenticatorTest(unittest.TestCase): self.path, ".well-known", "acme-challenge", "ZXZhR3hmQURzNnBTUmIyTEF2OUlaZjE3RHQzanV4R0orUEN0OTJ3citvQQ") self.config = mock.MagicMock(webroot_path=self.path, - webroot_map={"thing.com":self.path}) + webroot_map={"thing.com": self.path}) self.auth = Authenticator(self.config, "webroot") self.auth.prepare() diff --git a/letsencrypt/tests/cli_test.py b/letsencrypt/tests/cli_test.py index 991446447..853109636 100644 --- a/letsencrypt/tests/cli_test.py +++ b/letsencrypt/tests/cli_test.py @@ -348,15 +348,15 @@ class CLITest(unittest.TestCase): # pylint: disable=too-many-public-methods '/var/www/superfluous', '-d', 'superfluo.us', '-d', 'www.superfluo.us'] namespace = cli.prepare_and_parse_args(plugins, webroot_args) self.assertEqual(namespace.webroot_map, { - 'example.com' : '/var/www/example', - 'stray.example.com' : '/var/www/example', - 'www.example.com' : '/var/www/example', - 'www.superfluo.us' : '/var/www/superfluous', - 'superfluo.us' : '/var/www/superfluous'}) + 'example.com': '/var/www/example', + 'stray.example.com': '/var/www/example', + 'www.example.com': '/var/www/example', + 'www.superfluo.us': '/var/www/superfluous', + 'superfluo.us': '/var/www/superfluous'}) webroot_map_args = ['--webroot-map', '{"eg.com" : "/tmp"}'] namespace = cli.prepare_and_parse_args(plugins, webroot_map_args) - self.assertEqual(namespace.webroot_map, {u"eg.com" : u"/tmp"}) + self.assertEqual(namespace.webroot_map, {u"eg.com": u"/tmp"}) @mock.patch('letsencrypt.crypto_util.notAfter') @mock.patch('letsencrypt.cli.zope.component.getUtility')