commit | e779b9d90aa8f8df7117c0f1870a158d54ab8d95 | [log] [tgz] |
---|---|---|
author | Eric Salo <salo@google.com> | Tue Sep 27 18:02:21 2022 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Tue Sep 27 18:02:50 2022 -0700 |
tree | 0203c7871a4b28e65863d11028c7fcc08a86fc5a | |
parent | 23048df5259ab99a45918738adb534405e4da1a5 [diff] [blame] |
silently succeed when adding the same serialized file in Python PiperOrigin-RevId: 477321377
diff --git a/python/descriptor_pool.c b/python/descriptor_pool.c index 4e9faaa..073fbda 100644 --- a/python/descriptor_pool.c +++ b/python/descriptor_pool.c
@@ -218,8 +218,7 @@ } 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; } }