mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 08:03:19 +02:00
Correct pep8 errors across codebase.
This commit is contained in:
@@ -379,11 +379,12 @@ class NginxConfigurator(common.Plugin):
|
||||
:param unused_options: Not currently used
|
||||
:type unused_options: Not Available
|
||||
"""
|
||||
redirect_block = [[['if', '($scheme != "https")'],
|
||||
redirect_block = [[
|
||||
['if', '($scheme != "https")'],
|
||||
[['return', '301 https://$host$request_uri']]
|
||||
]]
|
||||
self.parser.add_server_directives(vhost.filep, vhost.names,
|
||||
redirect_block)
|
||||
self.parser.add_server_directives(
|
||||
vhost.filep, vhost.names, redirect_block)
|
||||
logger.info("Redirecting all traffic to ssl in %s", vhost.filep)
|
||||
|
||||
######################################
|
||||
|
||||
@@ -413,7 +413,7 @@ def _regex_match(target_name, name):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
except re.error: # pragma: no cover
|
||||
except re.error: # pragma: no cover
|
||||
# perl-compatible regexes are sometimes not recognized by python
|
||||
return False
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ def get_nginx_configurator(
|
||||
backups = os.path.join(work_dir, "backups")
|
||||
|
||||
with mock.patch("letsencrypt_nginx.configurator.le_util."
|
||||
"exe_exists") as mock_exe_exists:
|
||||
"exe_exists") as mock_exe_exists:
|
||||
mock_exe_exists.return_value = True
|
||||
|
||||
config = configurator.NginxConfigurator(
|
||||
|
||||
Reference in New Issue
Block a user