def __parse_data(self, proto_parse_class, data, file_hd):
"""
Args:
proto_parse_class:
data:
file_hd:
Returns:
"""
proto_parse_ob = proto_parse_class(data)
data_yield = proto_parse_ob.parse_data(sep="\x00")
for d in data_yield:
if d:
if file_hd:
file_hd.write("%r%s" % (d, os.linesep))
if self.std_output_enable:
if not isinstance(d, dict):
d = d.toDict()
print json.dumps(d, indent=4)
评论列表
文章目录