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

don't continue if there's no vhost

This commit is contained in:
Noah Swartz
2016-01-28 16:48:12 -08:00
parent 5f50d698ee
commit b7c94bb297

View File

@@ -865,6 +865,8 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
fp = vhost.filep
vh_p = self.aug.match("/files%s//* [label()=~regexp('%s')]" %
(fp, parser.case_i("VirtualHost")))
if not vh_p:
return
vh_path = vh_p[0]
if (self.parser.find_dir("ServerName", target_name, start=vh_path, exclude=False)
or self.parser.find_dir("ServerAlias", target_name, start=vh_path, exclude=False)):