Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use correct module for errors_found_in_log #3119

Merged
merged 4 commits into from
Feb 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions easybuild/framework/easyblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
from easybuild.framework.easyconfig.tools import get_paths_for
from easybuild.framework.easyconfig.templates import TEMPLATE_NAMES_EASYBLOCK_RUN_STEP, template_constant_dict
from easybuild.framework.extension import resolve_exts_filter_template
from easybuild.tools import config, filetools
from easybuild.tools import config, run
from easybuild.tools.build_details import get_build_stats
from easybuild.tools.build_log import EasyBuildError, dry_run_msg, dry_run_warning, dry_run_set_dirs
from easybuild.tools.build_log import print_error, print_msg, print_warning
Expand Down Expand Up @@ -3088,7 +3088,7 @@ def build_and_install_one(ecdict, init_env):

# restore original environment, and then sanitize it
_log.info("Resetting environment")
filetools.errors_found_in_log = 0
run.errors_found_in_log = 0
restore_env(init_env)
sanitize_env()

Expand Down Expand Up @@ -3239,10 +3239,9 @@ def build_and_install_one(ecdict, init_env):
print_msg("%s: Installation %s %s (took %s)" % (summary, ended, succ, req_time), log=_log, silent=silent)

# check for errors
if filetools.errors_found_in_log > 0:
print_msg("WARNING: %d possible error(s) were detected in the "
"build logs, please verify the build." % filetools.errors_found_in_log,
_log, silent=silent)
if run.errors_found_in_log > 0:
_log.warning("%d possible error(s) were detected in the "
"build logs, please verify the build.", run.errors_found_in_log)

if app.postmsg:
print_msg("\nWARNING: %s\n" % app.postmsg, log=_log, silent=silent)
Expand Down