Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a Merge() call allow not-yet-recognized new fields in P4Info files #132

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion p4runtime_sh/p4runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ def set_fwd_pipe_config(self, p4info_path, bin_path):
with open(p4info_path, 'r') as f1:
with open(bin_path, 'rb') as f2:
try:
google.protobuf.text_format.Merge(f1.read(), req.config.p4info)
google.protobuf.text_format.Merge(f1.read(), req.config.p4info,
allow_unknown_field=True)
except google.protobuf.text_format.ParseError:
logging.error("Error when parsing P4Info")
raise
Expand Down
Loading