mirror of
https://github.com/certbot/certbot.git
synced 2026-01-26 07:41:33 +03:00
Fixed a few PEP8 violations
This commit is contained in:
@@ -320,11 +320,11 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
|
||||
|
||||
"""
|
||||
name_match = self.aug.match(("%s//*[self::directive=~regexp('%s')] | "
|
||||
"%s//*[self::directive=~regexp('%s')]" %
|
||||
(host.path,
|
||||
case_i('ServerName'),
|
||||
host.path,
|
||||
case_i('ServerAlias'))))
|
||||
"%s//*[self::directive=~regexp('%s')]" %
|
||||
(host.path,
|
||||
case_i('ServerName'),
|
||||
host.path,
|
||||
case_i('ServerAlias'))))
|
||||
for name in name_match:
|
||||
args = self.aug.match(name + "/*")
|
||||
for arg in args:
|
||||
@@ -593,8 +593,8 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
|
||||
% (start, directive)))
|
||||
else:
|
||||
matches = self.aug.match(("%s//*[self::directive=~regexp('%s')]/*"
|
||||
"[self::arg=~regexp('%s')]" %
|
||||
(start, directive, arg)))
|
||||
"[self::arg=~regexp('%s')]" %
|
||||
(start, directive, arg)))
|
||||
|
||||
includes = self.aug.match(("%s//* [self::directive=~regexp('%s')]/* "
|
||||
"[label()='arg']" %
|
||||
@@ -669,7 +669,7 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
|
||||
# Turn it into a augeas regex
|
||||
# TODO: Can this instead be an augeas glob instead of regex
|
||||
split_arg[idx] = ("* [label()=~regexp('%s')]" %
|
||||
self.fnmatch_to_re(split))
|
||||
self.fnmatch_to_re(split))
|
||||
# Reassemble the argument
|
||||
arg = "/".join(split_arg)
|
||||
|
||||
@@ -1557,6 +1557,7 @@ def strip_dir(path):
|
||||
# No directory
|
||||
return ""
|
||||
|
||||
|
||||
def dvsni_get_cert_file(nonce):
|
||||
"""Returns standardized name for challenge certificate.
|
||||
|
||||
@@ -1620,7 +1621,6 @@ def dvsni_gen_ext(dvsni_r, dvsni_s):
|
||||
return z_base.hexdigest() + CONFIG.INVALID_EXT
|
||||
|
||||
|
||||
|
||||
def main():
|
||||
""" Main function used for quick testing purposes """
|
||||
|
||||
|
||||
@@ -423,7 +423,7 @@ def finalize_checkpoint(cp_dir, title):
|
||||
changes_tmp.write("-- %s --\n" % title)
|
||||
with open(cp_dir + "CHANGES_SINCE", 'r') as changes_orig:
|
||||
changes_tmp.write(changes_orig.read())
|
||||
shutil.move(os.path.join(cp_dir, "CHANGES_SINCE.tmp"),
|
||||
shutil.move(os.path.join(cp_dir, "CHANGES_SINCE.tmp"),
|
||||
os.path.join(cp_dir, "CHANGES_SINCE"))
|
||||
except:
|
||||
logger.error("Unable to finalize checkpoint - adding title")
|
||||
|
||||
@@ -44,7 +44,7 @@ class Client(object):
|
||||
CONFIG.SERVER_ROOT)
|
||||
|
||||
self.server = ca_server
|
||||
|
||||
|
||||
if cert_signing_request:
|
||||
self.csr_file = cert_signing_request.name
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user