Skip to content

Commit

Permalink
silently succeed when adding the same serialized file in Python
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 477321377
  • Loading branch information
ericsalo authored and copybara-github committed Sep 28, 2022
1 parent 23048df commit e779b9d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions python/descriptor_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,7 @@ static PyObject* PyUpb_DescriptorPool_DoAddSerializedFile(
}
const upb_MessageDef* m = PyUpb_DescriptorPool_GetFileProtoDef();
if (upb_Message_IsEqual(proto, existing, m)) {
Py_INCREF(Py_None);
result = Py_None;
result = PyUpb_FileDescriptor_Get(file);
goto done;
}
}
Expand Down

0 comments on commit e779b9d

Please sign in to comment.