Skip to content

Conversation

cldougl
Copy link
Member

@cldougl cldougl commented Apr 6, 2017

No description provided.

@cldougl cldougl requested review from Kully and chriddyp April 6, 2017 22:12
response = v2.files.update(fid, body)

return plot_url + '?share_key=' + response.json()['share_key']
if not v2.files.retrieve(fid).json()['share_key_enabled']:
Copy link
Member

Choose a reason for hiding this comment

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

I'd add a comment here about why we're trying multiple times

return plot_url + '?share_key=' + response.json()['share_key']
if not v2.files.retrieve(fid).json()['share_key_enabled']:
attempt += 1
if attempt == 10:
Copy link
Member

Choose a reason for hiding this comment

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

I'd be OK with bumping this up to 50 even

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 bumped to 50

if not v2.files.retrieve(fid).json()['share_key_enabled']:
attempt += 1
if attempt == 10:
raise Exception
Copy link
Member

Choose a reason for hiding this comment

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

We're trying to wrap everything in plotly exceptions so that users can catch them. So just: raise exceptions.PlotlyException (or something)

@chriddyp
Copy link
Member

chriddyp commented Apr 6, 2017

💃 once you consider my comments

@chriddyp chriddyp closed this Apr 6, 2017
@chriddyp chriddyp reopened this Apr 6, 2017
@cldougl cldougl merged commit 3efe833 into master Apr 7, 2017
@cldougl cldougl deleted the secret_fix branch July 21, 2017 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants