Skip to content

Commit afce2f6

Browse files
committed
Don't warn when not finding an option starting with _opt_
This happens for e.g. _opt_CC and friends and is allowed to be empty/unset according to the code in the setter function. This avoids half a dozen warnings per software part installed
1 parent 62473f3 commit afce2f6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

easybuild/tools/toolchain/options.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,12 @@ def option(self, name, templatedict=None):
8686
"""Return option value"""
8787
value = self.get(name, None)
8888
if value is None and name not in self.options_map:
89-
self.log.warning("option: option with name %s returns None" % name)
89+
msg = "option: option with name %s returns None" % name
90+
# Empty options starting with _opt_ are allowed, so don't warn
91+
if name.startswith('_opt_'):
92+
self.log.devel(msg)
93+
else:
94+
self.log.warning(msg)
9095
res = None
9196
elif name in self.options_map:
9297
res = self.options_map[name]

0 commit comments

Comments
 (0)