diff --git a/trezorlib/protobuf_json.py b/trezorlib/protobuf_json.py index 146468efab..2704fef6c9 100644 --- a/trezorlib/protobuf_json.py +++ b/trezorlib/protobuf_json.py @@ -76,9 +76,8 @@ def json2pb(pb, js): -def pb2json(pb): +def pb2json(pb, js={}): ''' convert google.protobuf.descriptor instance to JSON string ''' - js = {} # fields = pb.DESCRIPTOR.fields #all fields fields = pb.ListFields() # only filled (including extensions) for field, value in fields: