Skip to content

Preserve whitespace option doesn't handle blank lines and IfModule #103

@uriariel

Description

@uriariel

Traceback (most recent call last): File "/usr/local/bin/apacheconfigtool", line 10, in <module> sys.exit(main()) File "/usr/local/lib/python3.7/dist-packages/apacheconfig/apacheconfigtool.py", line 222, in main config = loader.load(config_file) File "/usr/local/lib/python3.7/dist-packages/apacheconfig/loader.py", line 399, in load return self.loads(f.read(), source=filepath) File "/usr/local/lib/python3.7/dist-packages/apacheconfig/loader.py", line 353, in loads self._ast_cache[source] = self._walkast(ast) File "/usr/local/lib/python3.7/dist-packages/apacheconfig/loader.py", line 321, in _walkast return handler(ast[1:]) File "/usr/local/lib/python3.7/dist-packages/apacheconfig/loader.py", line 44, in g_config items = self._walkast(subtree) File "/usr/local/lib/python3.7/dist-packages/apacheconfig/loader.py", line 321, in _walkast return handler(ast[1:]) File "/usr/local/lib/python3.7/dist-packages/apacheconfig/loader.py", line 95, in g_contents items = self._walkast(subtree) File "/usr/local/lib/python3.7/dist-packages/apacheconfig/loader.py", line 321, in _walkast return handler(ast[1:]) File "/usr/local/lib/python3.7/dist-packages/apacheconfig/loader.py", line 69, in g_block name, _, value = tag ValueError: not enough values to unpack (expected 3, got 2)

and even when I'm getting rid of blank lines, the parser with this option produces other errors.

Failed to parse Apache config conf/httpd.conf_b: Unsupported AST node type IfModule

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions