mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1219768 - make alert_emails field mandatory for new histograms. r=gfritzsche
alert_emails tell us who is interested in a particular histogram. If there's no one interested, then the histogram shouldn't exist. MozReview-Commit-ID: 90Yqof3dbsd
This commit is contained in:
parent
426a56ebc5
commit
160d65e501
File diff suppressed because it is too large
Load Diff
@ -206,9 +206,11 @@ associated with the histogram. Returns None if no guarding is necessary."""
|
||||
table_dispatch(definition['kind'], table,
|
||||
lambda allowed_keys: Histogram.check_keys(name, definition, allowed_keys))
|
||||
|
||||
if ('alert_emails' in definition
|
||||
and not isinstance(definition['alert_emails'], list)):
|
||||
raise KeyError, 'alert_emails must be an array if present (in Histogram %s)' % name
|
||||
if 'alert_emails' not in definition:
|
||||
if whitelists is not None and name not in whitelists['alert_emails']:
|
||||
raise KeyError, 'New histogram "%s" must have an alert_emails field.' % name
|
||||
elif not isinstance(definition['alert_emails'], list):
|
||||
raise KeyError, 'alert_emails must be an array (in histogram "%s")' % name
|
||||
|
||||
Histogram.check_name(name)
|
||||
Histogram.check_field_types(name, definition)
|
||||
|
Loading…
Reference in New Issue
Block a user