Skip to content

Commit

Permalink
Retries: add clarification comment + syntax tweaks (#2200)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ace Nassri authored Jun 7, 2019
1 parent 333677e commit 29ef01e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions functions/tips/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,8 @@ def retry_or_not(data, context):
None; output is written to Stackdriver Logging
"""

if data.data.get('retry'):
try_again = True
else:
try_again = False
# Retry based on a user-defined parameter
try_again = data.data.get('retry') is not None

try:
raise RuntimeError('I failed you')
Expand Down

0 comments on commit 29ef01e

Please sign in to comment.