silently succeed when adding the same serialized file in Python

PiperOrigin-RevId: 477321377
pull/13171/head
Eric Salo 2 years ago committed by Copybara-Service
parent 23048df525
commit e779b9d90a
  1. 3
      python/descriptor_pool.c

@ -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;
}
}

Loading…
Cancel
Save