Skip to content

Bug when using certain characters in config file  #48

@ddejong-therp

Description

@ddejong-therp

I get this error when rebuilding waft where I have certain symbols in the common/conf.d/override-odoo.cfg file:

Traceback (most recent call last):
  File "/home/bamilab/code/waft14/.venv/bin/config-generate", line 61, in <module>
    result = Template(result).substitute(os.environ)
  File "/home/bamilab/code/waft14/.pyenv/versions/3.6.15/lib/python3.6/string.py", line 130, in substitute
    return self.pattern.sub(convert, self.template)
  File "/home/bamilab/code/waft14/.pyenv/versions/3.6.15/lib/python3.6/string.py", line 127, in convert
    self._invalid(mo)
  File "/home/bamilab/code/waft14/.pyenv/versions/3.6.15/lib/python3.6/string.py", line 103, in _invalid
    (lineno, colno))
ValueError: Invalid placeholder in string: line 14, col 19
Traceback (most recent call last):
  File "/home/bamilab/code/waft14/common/entrypoint", line 39, in <module>
    subprocess.check_call(command)
  File "/home/bamilab/code/waft14/.pyenv/versions/3.6.15/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/home/bamilab/code/waft14/common/entrypoint.d/50-config-generate' returned non-zero exit status 1.

Her is my current config file:

[options]
# Version: v.22.05.30
# Configure odoo options
# Feel free to tune the variables in this file as you like
# These variables here will override the variables in odoo.cfg
# Push this file to your own repository
without_demo =
db_name = odoo14
dbfilter = ^odoo14$

When I remove the ^ and $ symbols, it works again.
I've pulled the latest changes of waftlib master, to make sure it's still happening in the latest version.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions