diff --git a/letsencrypt-apache/letsencrypt_apache/configurator.py b/letsencrypt-apache/letsencrypt_apache/configurator.py index 579668aae..e1af9c8a5 100644 --- a/letsencrypt-apache/letsencrypt_apache/configurator.py +++ b/letsencrypt-apache/letsencrypt_apache/configurator.py @@ -1003,7 +1003,7 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator): "Unsupported directory layout. You may try to enable mod %s " "and try again." % mod_name) - deps = self._get_mod_deps(mod_name) + deps = _get_mod_deps(mod_name) # Enable all dependencies for dep in deps: @@ -1034,24 +1034,6 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator): self.parser.modules.add(mod_name + "_module") self.parser.modules.add("mod_" + mod_name + ".c") - def _get_mod_deps(self, mod_name): - """Get known module dependencies. - - .. note:: This does not need to be accurate in order for the client to - run. This simply keeps things clean if the user decides to revert - changes. - .. warning:: If all deps are not included, it may cause incorrect parsing - behavior, due to enable_mod's shortcut for updating the parser's - currently defined modules (:method:`._add_parser_mod`) - This would only present a major problem in extremely atypical - configs that use ifmod for the missing deps. - - """ - deps = { - "ssl": ["setenvif", "mime", "socache_shmcb"] - } - return deps.get(mod_name, []) - def _enable_mod_debian(self, mod_name, temp): """Assumes mods-available, mods-enabled layout.""" # Generate reversal command. @@ -1176,6 +1158,25 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator): self.parser.init_modules() +def _get_mod_deps(mod_name): + """Get known module dependencies. + + .. note:: This does not need to be accurate in order for the client to + run. This simply keeps things clean if the user decides to revert + changes. + .. warning:: If all deps are not included, it may cause incorrect parsing + behavior, due to enable_mod's shortcut for updating the parser's + currently defined modules (:method:`._add_parser_mod`) + This would only present a major problem in extremely atypical + configs that use ifmod for the missing deps. + + """ + deps = { + "ssl": ["setenvif", "mime", "socache_shmcb"] + } + return deps.get(mod_name, []) + + def apache_restart(apache_init_script): """Restarts the Apache Server.