Skip to content
Snippets Groups Projects
Verified Commit 463e9526 authored by Romain Deville's avatar Romain Deville
Browse files

:bug: Fix subs() bug in plugins.py

`subs()` method print an error if returned dictionary is empty.
This commit fix it by adding a condition to ensure dictionary is not empty
else return None.
parent fecc4c2e
No related branches found
No related tags found
No related merge requests found
......@@ -914,9 +914,11 @@ def define_env(env: dict) -> None:
var: Key in env.variables to return.
Returns:
The value of `env.variables[var]`.
The value of `env.variables[var]` if it exists, else return None.
"""
return env.variables[var]
if var in env.variables:
return env.variables[var]
return None
@env.macro
# pylint: disable=W0612
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment