mirror of
https://github.com/certbot/certbot.git
synced 2026-04-22 14:47:13 -04:00
check for missed define statements at the end of parsing
This commit is contained in:
parent
d76cd9c315
commit
ce2ce697bd
1 changed files with 8 additions and 1 deletions
|
|
@ -35,6 +35,7 @@ class ApacheParser(object):
|
|||
# https://httpd.apache.org/docs/2.4/mod/core.html#ifdefine
|
||||
# This only handles invocation parameters and Define directives!
|
||||
self.variables = {}
|
||||
self.unparsable = False
|
||||
self.update_runtime_variables(ctl)
|
||||
|
||||
self.aug = aug
|
||||
|
|
@ -58,6 +59,10 @@ class ApacheParser(object):
|
|||
# Must also attempt to parse sites-available or equivalent
|
||||
# Sites-available is not included naturally in configuration
|
||||
self._parse_file(os.path.join(self.root, "sites-available") + "/*")
|
||||
#TODO check to see if there were unparsed define statements
|
||||
if self.unparsable:
|
||||
if self.find_dir("Define", exclude=False):
|
||||
raise errors.PluginError("Error parsing runtime variables")
|
||||
|
||||
def init_modules(self):
|
||||
"""Iterates on the configuration until no new modules are loaded.
|
||||
|
|
@ -100,7 +105,9 @@ class ApacheParser(object):
|
|||
try:
|
||||
matches.remove("DUMP_RUN_CFG")
|
||||
except ValueError:
|
||||
raise errors.PluginError("Unable to parse runtime variables")
|
||||
self.unparsable = True
|
||||
return
|
||||
#raise errors.PluginError("Unable to parse runtime variables")
|
||||
|
||||
for match in matches:
|
||||
if match.count("=") > 1:
|
||||
|
|
|
|||
Loading…
Reference in a new issue