diff --git a/waflib/Build.py b/waflib/Build.py index b49dd830..e4f5050e 100644 --- a/waflib/Build.py +++ b/waflib/Build.py @@ -109,7 +109,7 @@ class BuildContext(Context.Context): self.keep = Options.options.keep """Whether the build should continue past errors""" - self.progress_bar = Options.options.progress_bar + self.progress_bar = getattr(Options.options, 'progress_bar', 0) """ Level of progress status: diff --git a/waflib/Configure.py b/waflib/Configure.py index ca64f981..edb6f584 100644 --- a/waflib/Configure.py +++ b/waflib/Configure.py @@ -95,7 +95,7 @@ class ConfigurationContext(Context.Context): top = self.top_dir if not top: - top = Options.options.top + top = getattr(Options.options, 'top', None) if not top: top = getattr(Context.g_module, Context.TOP, None) if not top: @@ -107,7 +107,7 @@ class ConfigurationContext(Context.Context): out = self.out_dir if not out: - out = Options.options.out + out = getattr(Options.options, 'out', None) if not out: out = getattr(Context.g_module, Context.OUT, None) if not out: diff --git a/waflib/Scripting.py b/waflib/Scripting.py index 05e3beef..1bb074e4 100644 --- a/waflib/Scripting.py +++ b/waflib/Scripting.py @@ -56,10 +56,10 @@ def waf_entry_point(current_directory, version, wafdir): if options.version: print('%s %s (%s)'%(Context.WAFNAME, Context.WAFVERSION, Context.WAFREVISION)) sys.exit(0) - if options.top: + if getattr(options, 'top', None): start_dir = Context.run_dir = Context.top_dir = options.top no_climb = True - if options.out: + if getattr(options, 'out', None): Context.out_dir = options.out # if 'configure' is in the commands, do not search any further