mirror of
https://github.com/certbot/certbot.git
synced 2026-06-04 14:26:10 -04:00
Address review comments
This commit is contained in:
parent
bd727d3127
commit
794c1dc13f
2 changed files with 8 additions and 2 deletions
|
|
@ -93,7 +93,8 @@ class CentOSConfigurator(configurator.ApacheConfigurator):
|
|||
if self.parser.not_modssl_ifmodule(noarg_path): # pylint: disable=no-member
|
||||
if self.parser.loc["default"] in noarg_path:
|
||||
# LoadModule already in the main configuration file
|
||||
if "ifmodule/" in noarg_path or "ifmodule[1]" in noarg_path.lower():
|
||||
if ("ifmodule/" in noarg_path.lower() or
|
||||
"ifmodule[1]" in noarg_path.lower()):
|
||||
# It's the first or only IfModule in the file
|
||||
return
|
||||
# Populate the list of known !mod_ssl.c IfModules
|
||||
|
|
|
|||
|
|
@ -300,6 +300,11 @@ class ApacheParser(object):
|
|||
:param bool beginning: If the IfModule should be created to the beginning
|
||||
of augeas path DOM tree.
|
||||
|
||||
:returns: Augeas path of the requested IfModule directive that pre-existed
|
||||
or was created during the process. The path may be dynamic,
|
||||
i.e. .../IfModule[last()]
|
||||
:rtype: str
|
||||
|
||||
"""
|
||||
if_mods = self.aug.match(("%s/IfModule/*[self::arg='%s']" %
|
||||
(aug_conf_path, mod)))
|
||||
|
|
@ -310,7 +315,7 @@ class ApacheParser(object):
|
|||
return if_mods[0].rpartition("arg")[0]
|
||||
|
||||
def create_ifmod(self, aug_conf_path, mod, beginning=False):
|
||||
"""Creates a new <IfMod mod> and returs it path.
|
||||
"""Creates a new <IfMod mod> and returns its path.
|
||||
|
||||
:param str aug_conf_path: Augeas configuration path
|
||||
:param str mod: module ie. mod_ssl.c
|
||||
|
|
|
|||
Loading…
Reference in a new issue