Skip to content

Commit

Permalink
Fix get_config_plotly_server_url on .config load error
Browse files Browse the repository at this point in the history
If .config is not found or not loaded it should be treated as empty,
but it's resulting in an `UnboundLocalError`
  • Loading branch information
jonmmease committed May 6, 2019
1 parent 364321f commit 6c0a66d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plotly/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1280,10 +1280,10 @@ def get_config_plotly_server_url():
try:
config_dict = json.load(f)
if not isinstance(config_dict, dict):
data = {}
config_dict = {}
except:
# TODO: issue a warning and bubble it up
data = {}
config_dict = {}

return config_dict.get('plotly_domain', default_server_url)

Expand Down

0 comments on commit 6c0a66d

Please sign in to comment.