1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-21 19:01:07 +03:00

simplified augeas get, with parsers get_arg func

This commit is contained in:
sagi
2015-12-11 11:59:26 +00:00
parent 5f05c5104e
commit 2edfc1cd59

View File

@@ -972,10 +972,10 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
:type vhost: :class:`~letsencrypt_apache.obj.VirtualHost`
"""
rewrite_engine_path = self.parser.find_dir("RewriteEngine", None,
rewrite_engine_path = self.parser.find_dir("RewriteEngine", "on",
start=vhost.path)
if rewrite_engine_path:
return self.aug.get(rewrite_engine_path[0]).lower() == "on"
return self.parser.get_arg(rewrite_engine_path[0])
return False
def _create_redirect_vhost(self, ssl_vhost):