| 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,
|
|
|