mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-22 01:46:15 +01:00
Teach use_config to more gracefully fail during options() call #2043
This commit is contained in:
parent
f7833e73ff
commit
1e994e50fb
@ -149,6 +149,9 @@ def load_tool(tool, tooldir=None, ctx=None, with_sys_path=True):
|
||||
try:
|
||||
module = Context.load_tool_default(tool, tooldir, ctx, with_sys_path)
|
||||
except ImportError as e:
|
||||
if not ctx or not hasattr(Options.options, 'download'):
|
||||
Logs.error('Could not load %r during options phase (download unavailable at this point)' % tool)
|
||||
raise
|
||||
if Options.options.download:
|
||||
module = download_tool(tool, ctx=ctx)
|
||||
if not module:
|
||||
|
Loading…
Reference in New Issue
Block a user