Commit 487cf013 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

gen_ir: Simplify parsing of -D.

parent 593717e3
......@@ -41,11 +41,7 @@ def main(argv):
env.globals.update(jinjautil.exports)
env.filters.update(jinjautil.filters)
for definition in config.definitions:
if "=" not in definition:
name = definition
replacement = ""
else:
(name, replacement) = definition.split("=", 1)
(name, _, replacement) = definition.partition("=")
env.globals[name] = replacement
template = env.get_template(config.templatefile)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment