Skip to content

Conversation

@daspecster
Copy link
Contributor

Fixes #2771

This copies the messages variable instead of transforming it in place so that if a commit() fails, the messages aren't double encoded.

@daspecster daspecster added the api: pubsub Issues related to the Pub/Sub API. label Nov 28, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 28, 2016
:returns: list of opaque IDs for published messages.
"""
_transform_messages_base64(messages, _base64_unicode)
messages_to_send = copy.deepcopy(messages)

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@daspecster daspecster merged commit c40e0d4 into googleapis:master Nov 29, 2016
@daspecster daspecster deleted the support-multiple-commits-if-failed-2771 branch November 29, 2016 03:26
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
…ommits-if-failed-2771

Fix double encoding of messages when commit() fails.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsub Issues related to the Pub/Sub API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants