(s, function_map)
| 225 | |
| 226 | |
| 227 | def GetContentFromProtoString(s, function_map): |
| 228 | for cls, func in function_map.items(): |
| 229 | try: |
| 230 | obj = TryReadProtoWithClass(cls, s) |
| 231 | return func(obj) |
| 232 | except DecodeError: |
| 233 | continue |
| 234 | else: |
| 235 | raise DecodeError("Cannot find a fit protobuffer class.") |
| 236 | |
| 237 | |
| 238 | def ConvertProtoToBinary(proto_class, filename, out_filename): |
nothing calls this directly
no test coverage detected
searching dependent graphs…