Bug 1419182 - Remove unused required keys feature; r?build
Nobody passes in the "required" argument. Remove it and
functionality related to it.
MozReview-Commit-ID: IB8s4CiDy6a
--- a/build/compare-mozconfig/compare-mozconfigs.py
+++ b/build/compare-mozconfig/compare-mozconfigs.py
@@ -31,29 +31,21 @@ def make_hg_url(hgHost, repoPath, protoc
return repo
else:
return '/'.join([p.strip('/') for p in [repo, 'rev', revision]])
else:
assert revision
return '/'.join([p.strip('/') for p in [repo, 'raw-file', revision,
filename]])
-def readConfig(configfile, keys=[], required=[]):
+def readConfig(configfile, keys=[]):
c = {}
execfile(configfile, c)
for k in keys:
c = c[k]
- items = c.keys()
- err = False
- for key in required:
- if key not in items:
- err = True
- log.error("Required item `%s' missing from %s" % (key, c))
- if err:
- raise ConfigError("Missing at least one item in config, see above")
return c
def verify_mozconfigs(mozconfig_pair, nightly_mozconfig_pair, platform,
mozconfigWhitelist={}):
"""Compares mozconfig to nightly_mozconfig and compare to an optional
whitelist of known differences. mozconfig_pair and nightly_mozconfig_pair
are pairs containing the mozconfig's identifier and the list of lines in
the mozconfig."""