cbuildbot_config: Allow access to config values through attributes.
The _config class inherits from dict, and because of that all access to
config values is through the "[]" dict interface. This change supports
accessing those values as attributes on each config object.
Also as part of this change, the default value for the "useflags"
setting is changed from None to []. This is the default value that was
assumed in multiple places in the code. Now the default is explicit in
one place.
BUG=chromium:307321
TEST=unittest
TEST=cbuildbot --remote with targets:
x86-generic-full
TEST=cbuildbot --remote --buildbot --debug with targets:
x86-mario-paladin
x86-alex-paladin
Change-Id: I869863b1e06fe49c3de1eb2976832a5024ca263b
Reviewed-on: https://chromium-review.googlesource.com/178302
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Matt Tennant <mtennant@chromium.org>
Commit-Queue: Matt Tennant <mtennant@chromium.org>
diff --git a/scripts/cbuildbot.py b/scripts/cbuildbot.py
index 1f4e26c..a901f72 100644
--- a/scripts/cbuildbot.py
+++ b/scripts/cbuildbot.py
@@ -761,7 +761,7 @@
if options.managed_chrome:
# Tell Chrome to fetch the source locally.
- internal = constants.USE_CHROME_INTERNAL in (build_config['useflags'] or [])
+ internal = constants.USE_CHROME_INTERNAL in build_config['useflags']
chrome_src = 'chrome-src-internal' if internal else 'chrome-src'
options.chrome_root = os.path.join(options.cache_dir, 'distfiles', 'target',
chrome_src)