Gets a specific field from a protocol buffer that matches the given class
(obj, function_map)
| 217 | |
| 218 | |
| 219 | def GetContentFromProto(obj, function_map): |
| 220 | """Gets a specific field from a protocol buffer that matches the given class |
| 221 | """ |
| 222 | for cls, func in function_map.items(): |
| 223 | if type(obj) is cls: |
| 224 | return func(obj) |
| 225 | |
| 226 | |
| 227 | def GetContentFromProtoString(s, function_map): |