Skip to content

Commit

Permalink
Optionally call log.warning in print_warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Feb 10, 2020
1 parent 1033745 commit 3959140
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions easybuild/tools/build_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,13 @@ def print_warning(msg, *args, **kwargs):
if args:
msg = msg % args

log = kwargs.pop('log', None)
silent = kwargs.pop('silent', False)
if kwargs:
raise EasyBuildError("Unknown named arguments passed to print_warning: %s", kwargs)

if log:
log.warning(msg)
if not silent:
sys.stderr.write("\nWARNING: %s\n\n" % msg)

Expand Down

0 comments on commit 3959140

Please sign in to comment.