summaryrefslogtreecommitdiff
path: root/buildstream/_options
diff options
context:
space:
mode:
authorGökçen Nurlu <gnurlu1@bloomberg.net>2017-11-13 10:22:12 +0000
committerGökçen Nurlu <gnurlu1@bloomberg.net>2017-11-17 11:46:34 +0000
commit3b17762a4cab23c238762ca32baa348788347473 (patch)
tree3f709fac5b116154c8535abd44f878ba96a8eab0 /buildstream/_options
parent44b00de090348f94d27998e5378c1beef0db6296 (diff)
downloadbuildstream-3b17762a4cab23c238762ca32baa348788347473.tar.gz
Switch old-style string formattings to new '.format()'
Diffstat (limited to 'buildstream/_options')
-rw-r--r--buildstream/_options/optionpool.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/buildstream/_options/optionpool.py b/buildstream/_options/optionpool.py
index 387080110..90a404bfb 100644
--- a/buildstream/_options/optionpool.py
+++ b/buildstream/_options/optionpool.py
@@ -138,7 +138,7 @@ class OptionPool():
# Variables must be resolved at this point.
#
try:
- template_string = "{%% if %s %%} True {%% else %%} False {%% endif %%}" % expression
+ template_string = "{{% if {} %}} True {{% else %}} False {{% endif %}}".format(expression)
template = self.environment.from_string(template_string)
context = template.new_context(self.variables, shared=True)
result = template.root_render_func(context)