Skip to content

Commit

Permalink
Add option to silence the deprecation about failure to resolve a temp…
Browse files Browse the repository at this point in the history
…late

Useful workaround if there are still some missing fixes.
  • Loading branch information
Flamefire committed Dec 7, 2023
1 parent 2a3ca35 commit 3dfe8c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion easybuild/framework/easyconfig/easyconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -2045,7 +2045,10 @@ def resolve_template(value, tmpl_dict, expect_resolved=True):
if expect_resolved:
depr_msg = ('Ignoring failure to resolve template value %s with dict %s.' % (value, tmpl_dict) +
'\n\tThis is deprecated and will lead to build failure. Check for correct escaping.')
_log.deprecated(depr_msg, '5.0')
if 'resolve-templates' in build_option('silence_deprecation_warnings'):
_log.warning(depr_msg, '5.0')
else:
_log.deprecated(depr_msg, '5.0')
else:
# this block deals with references to objects and returns other references
# for reading this is ok, but for self['x'] = {}
Expand Down

0 comments on commit 3dfe8c1

Please sign in to comment.