Skip to content

Commit 0c189f2

Browse files
committed
changed validate_config_file to validate_domains
1 parent 6b12bf2 commit 0c189f2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

plotly/tools.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
)
7474

7575

76-
def validate_config_file(*domains):
76+
def validate_domains(*domains):
7777
for d in domains:
7878
if not d.lower().startswith('https'):
7979
warnings.warn(http_msg)
@@ -224,7 +224,7 @@ def set_config_file(plotly_domain=None,
224224
'sharing': sharing, 'world_readable': world_readable})
225225
settings = get_config_file()
226226
if isinstance(plotly_domain, six.string_types):
227-
validate_config_file(plotly_domain)
227+
#validate_domains(plotly_domain)
228228
settings['plotly_domain'] = plotly_domain
229229
elif plotly_domain is not None:
230230
raise TypeError('plotly_domain should be a string')
@@ -233,7 +233,7 @@ def set_config_file(plotly_domain=None,
233233
elif plotly_streaming_domain is not None:
234234
raise TypeError('plotly_streaming_domain should be a string')
235235
if isinstance(plotly_api_domain, six.string_types):
236-
validate_config_file(plotly_api_domain)
236+
#validate_domains(plotly_api_domain)
237237
settings['plotly_api_domain'] = plotly_api_domain
238238
elif plotly_api_domain is not None:
239239
raise TypeError('plotly_api_domain should be a string')
@@ -276,10 +276,9 @@ def get_config_file(*args):
276276
"""
277277
if check_file_permissions():
278278
ensure_local_plotly_files() # make sure what's there is OK
279-
returned_obj = utils.load_json_dict(CONFIG_FILE, *args)
279+
return utils.load_json_dict(CONFIG_FILE, *args)
280280
else:
281-
returned_obj = FILE_CONTENT[CONFIG_FILE]
282-
return returned_obj
281+
return FILE_CONTENT[CONFIG_FILE]
283282

284283

285284
def reset_config_file():

0 commit comments

Comments
 (0)