From f48ef6ded9af20deb6db296c12498902052b4493 Mon Sep 17 00:00:00 2001 From: Peter Eckersley Date: Thu, 19 Nov 2015 10:09:10 -0800 Subject: [PATCH] lint --- letsencrypt/cli.py | 7 ++++--- letsencrypt/plugins/webroot.py | 6 ++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/letsencrypt/cli.py b/letsencrypt/cli.py index 914df7fb5..3dd53f011 100644 --- a/letsencrypt/cli.py +++ b/letsencrypt/cli.py @@ -1038,7 +1038,7 @@ def _plugins_parsing(helpful, plugins): helpful.add_plugin_args(plugins) -class WebrootPathProcessor(argparse.Action): +class WebrootPathProcessor(argparse.Action): # pylint: disable=missing-docstring def __call__(self, parser, config, webroot, option_string=None): """ Keep a record of --webroot-path / -w flags during processing, so that @@ -1056,13 +1056,14 @@ class WebrootPathProcessor(argparse.Action): config.webroot_path.append(webroot) -class DomainFlagProcessor(argparse.Action): +class DomainFlagProcessor(argparse.Action): # pylint: disable=missing-docstring def __call__(self, parser, config, domain_arg, option_string=None): """ Process a new -d flag, helping the webroot plugin construct a map of {domain : webrootpath} if -w / --webroot-path is in use """ - if not config.domains: config.domains = [] + if not config.domains: + config.domains = [] new_domains = [d.strip() for d in domain_arg.split(",") if d not in config.domains] config.domains.extend(new_domains) diff --git a/letsencrypt/plugins/webroot.py b/letsencrypt/plugins/webroot.py index 1c5093b03..4e18f5ca2 100644 --- a/letsencrypt/plugins/webroot.py +++ b/letsencrypt/plugins/webroot.py @@ -38,7 +38,6 @@ Use the following snippet in your ``server{...}`` stanza:: and reload your daemon. """ -import argparse import errno import logging import os @@ -92,8 +91,7 @@ to serve all files under specified web root ({0}).""" self.option_name("path"))) for name, path in path_map.items(): if not os.path.isdir(path): - raise errors.PluginError( - path + " does not exist or is not a directory") + raise errors.PluginError(path + " does not exist or is not a directory") self.full_roots[name] = os.path.join(path, challenges.HTTP01.URI_ROOT_PATH) logger.debug("Creating root challenges validation dir at %s", @@ -107,7 +105,7 @@ to serve all files under specified web root ({0}).""" "challenge responses: {1}", name, exception) def perform(self, achalls): # pylint: disable=missing-docstring - assert self.full_root, "Webroot plugin appears to be missing webroot map" + assert self.full_roots, "Webroot plugin appears to be missing webroot map" return [self._perform_single(achall) for achall in achalls] def _path_for_achall(self, achall):