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

Unified Diff: client/third_party/infra_libs/ts_mon/common/pb_to_popo.py

Issue 2573343002: Roll infra_libs and its dependencies to 066f135 (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: client/third_party/infra_libs/ts_mon/common/pb_to_popo.py
diff --git a/client/third_party/infra_libs/ts_mon/common/pb_to_popo.py b/client/third_party/infra_libs/ts_mon/common/pb_to_popo.py
index 8266f9af7df92526315a7d849bb16e0af7d63441..53d64e3171d791dc3eeff208ec77722b7797e176 100644
--- a/client/third_party/infra_libs/ts_mon/common/pb_to_popo.py
+++ b/client/third_party/infra_libs/ts_mon/common/pb_to_popo.py
@@ -16,6 +16,7 @@ def convert(pb):
obj[field.name] = _get_json_func(field.type)(value)
return obj
+
def _get_json_func(field_type):
if field_type in _FD_TO_JSON:
return _FD_TO_JSON[field_type]
@@ -23,6 +24,7 @@ def _get_json_func(field_type):
logging.warning("pb_to_popo doesn't support converting %s", field_type)
return unicode
+
_FD_TO_JSON = {
fd.TYPE_BOOL: bool,
fd.TYPE_DOUBLE: float,
« no previous file with comments | « client/third_party/infra_libs/ts_mon/common/monitors.py ('k') | client/third_party/infra_libs/ts_mon/config.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698