diff options
author | Seth Schoen <schoen@eff.org> | 2016-08-11 03:16:54 +0300 |
---|---|---|
committer | Seth Schoen <schoen@eff.org> | 2016-08-11 03:16:54 +0300 |
commit | 4bbb12f182341c4d05fe808b03424467949e13b6 (patch) | |
tree | 3e92ce40fbcd9c9e3c777b3ab91b030e74f2503a /certbot-compatibility-test | |
parent | ade66fbbfa89e7c425dfc47e1aa6990bc5badc73 (diff) |
Satisfying some lint complaints
Diffstat (limited to 'certbot-compatibility-test')
3 files changed, 5 insertions, 6 deletions
diff --git a/certbot-compatibility-test/certbot_compatibility_test/configurators/apache/common.py b/certbot-compatibility-test/certbot_compatibility_test/configurators/apache/common.py index 4e612bbd5..b7b1f52c2 100644 --- a/certbot-compatibility-test/certbot_compatibility_test/configurators/apache/common.py +++ b/certbot-compatibility-test/certbot_compatibility_test/configurators/apache/common.py @@ -1,5 +1,4 @@ """Provides a common base for Apache proxies""" -import re import os import shutil import subprocess diff --git a/certbot-compatibility-test/certbot_compatibility_test/configurators/nginx/__init__.py b/certbot-compatibility-test/certbot_compatibility_test/configurators/nginx/__init__.py index d559d0645..ed294abe6 100644 --- a/certbot-compatibility-test/certbot_compatibility_test/configurators/nginx/__init__.py +++ b/certbot-compatibility-test/certbot_compatibility_test/configurators/nginx/__init__.py @@ -1 +1 @@ -"""Certbot compatibility test Apache configurators""" +"""Certbot compatibility test Nginx configurators""" diff --git a/certbot-compatibility-test/certbot_compatibility_test/configurators/nginx/common.py b/certbot-compatibility-test/certbot_compatibility_test/configurators/nginx/common.py index 0d72605b7..311ae4ba6 100644 --- a/certbot-compatibility-test/certbot_compatibility_test/configurators/nginx/common.py +++ b/certbot-compatibility-test/certbot_compatibility_test/configurators/nginx/common.py @@ -1,5 +1,4 @@ -"""Provides a common base for Apache proxies""" -import re +"""Provides a common base for Nginx proxies""" import os import shutil import subprocess @@ -78,7 +77,7 @@ class Proxy(configurators_common.Proxy): # This does not appear to exist in nginx (yet?) # self.le_config.nginx_handle_modules = self.le_config.nginx_handle_mods - conf=configuration.NamespaceConfig(self.le_config) + conf = configuration.NamespaceConfig(self.le_config) zope.component.provideUtility(conf) self._nginx_configurator = configurator.NginxConfigurator( config=conf, name="nginx") @@ -132,6 +131,7 @@ def _get_names(config): for line in open(os.path.join(root, this_file)): if line.strip().startswith("server_name"): names = line.partition("server_name")[2].rpartition(";")[0] - [all_names.add(n) for n in names.split()] + for n in names.split(): + all_names.add(n) non_ip_names = set(n for n in all_names if not util.IP_REGEX.match(n)) return all_names, non_ip_names |