Skip to content

Commit

Permalink
fix: Exception when calling MessageToDict
Browse files Browse the repository at this point in the history
  • Loading branch information
anosora233 committed Apr 28, 2024
1 parent 5586219 commit 9c7d178
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mhm/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def _parsedict(parser: Message, serialized: bytes):
parser.ParseFromString(serialized)
return MessageToDict(
parser,
including_default_value_fields=True,
always_print_fields_with_no_presence=True,
preserving_proto_field_name=True,
)

Expand Down
2 changes: 1 addition & 1 deletion mhm/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(self, lqbin: bytes, version: str) -> None:

message_dict = MessageToDict(
message,
including_default_value_fields=True,
always_print_fields_with_no_presence=True,
preserving_proto_field_name=True,
) # IDEA: It seems that there is no need to convert msg into a dict

Expand Down

0 comments on commit 9c7d178

Please sign in to comment.