Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(939)

Side by Side Diff: tools/telemetry/telemetry/value/none_values.py

Issue 475503004: Support None value for telemetry values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 MERGE_FAILURE_REASON = "Unable to merge values with None value."
chrishenry 2014/08/15 04:43:20 The merge is successful tho, so maybe "Merging val
ariblue 2014/08/15 22:10:26 Done.
6
7 class NoneValueMissingReason(Exception):
8 pass
9
10 class ValueMustHaveNoneValue(Exception):
11 pass
12
13 def ValidateValue(value, none_value_reason):
nednguyen 2014/08/15 15:50:04 Maybe ValidateNoneAbleValue.
ariblue 2014/08/15 22:10:26 How about ValidateNullableValue?
14 if value is None and none_value_reason is None:
15 raise NoneValueMissingReason()
16 if value is not None and none_value_reason is not None:
17 raise ValueMustHaveNoneValue()
chrishenry 2014/08/15 04:43:20 Should this just be part of __init__.py? Thoughts?
nednguyen 2014/08/15 15:50:04 I find the situation of partly "adding the new fie
chrishenry 2014/08/15 16:32:40 Some raw thoughts from my end on this. I don't thi
ariblue 2014/08/15 22:10:26 Acknowledged.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698