Skip to content
This repository was archived by the owner on Mar 20, 2018. It is now read-only.
Open
Changes from 1 commit
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
7 changes: 4 additions & 3 deletions google/gax/retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,11 @@ def inner(*args):
return to_call(*args)
except Exception as exception: # pylint: disable=broad-except
code = config.exc_to_code(exception)

# Do not be greedy; if this is an exception that we do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I'm not sure "do not be greedy" is going to make sense to someone reading this code without knowledge of its history.

# not know for sure should be retried, simply re-raise it.
if code not in retry_options.retry_codes:
raise errors.RetryError(
'Exception occurred in retry method that was not'
' classified as transient', exception)
raise

# pylint: disable=redefined-variable-type
exc = errors.RetryError(
Expand Down