Commit 2ec638ec authored by Seblu's avatar Seblu
Browse files

Allow use of re module in eval_ functions

parent da7b4b5d
......@@ -105,7 +105,7 @@ class VersionController(object):
# apply eval to upstream
e_upstream = value.get("eval_upstream", None)
if e_upstream is not None:
v_upstream = eval(e_upstream, {}, {"version": v_upstream})
v_upstream = eval(e_upstream, {"re": re}, {"version": v_upstream})
logging.debug("eval_upstream produce version: %s" % v_upstream)
# save upstream version
if self._cache["upstream"].get(name, {}).get("version", None) != v_upstream:
......@@ -123,7 +123,7 @@ class VersionController(object):
# apply eval to downstream
e_downstream = value.get("eval_downstream", None)
if e_downstream is not None:
v_downstream = eval(e_downstream, {}, {"version": v_downstream})
v_downstream = eval(e_downstream, {"re": re}, {"version": v_downstream})
logging.debug("eval_downstream produce version: %s" % v_downstream)
# save downstream version
if self._cache["downstream"].get(name, {}).get("version", None) != v_downstream:
......
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