Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 43aded3

Browse filesBrowse files
committed
change proxy_passwd ---> proxy_password
1 parent 2e3239b commit 43aded3
Copy full SHA for 43aded3

File tree

2 files changed

+10
-11
lines changed
Filter options

2 files changed

+10
-11
lines changed

‎plotly/plotly/plotly.py

Copy file name to clipboardExpand all lines: plotly/plotly/plotly.py
+2-6Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,18 +1201,14 @@ def headers(cls):
12011201
username, api_key))).decode('utf8')
12021202

12031203
headers = {
1204-
'authorization': 'Basic ' + encoded_api_auth,
12051204
'plotly-client-platform': 'python {0}'.format(version.__version__)
12061205
}
12071206

12081207
if get_config()['plotly_proxy_authorization']:
1209-
1210-
# custom enterprise + proxy authentication
12111208
proxy_username = credentials['proxy_username']
1212-
proxy_passwd = credentials['proxy_passwd']
1209+
proxy_password = credentials['proxy_password']
12131210
encoded_proxy_auth = base64.b64encode(six.b('{0}:{1}'.format(
1214-
proxy_username, proxy_passwd))).decode('utf8')
1215-
1211+
proxy_username, proxy_password))).decode('utf8')
12161212
headers['authorization'] = 'Basic ' + encoded_proxy_auth
12171213
headers['plotly-authorization'] = 'Basic ' + encoded_api_auth
12181214

‎plotly/tools.py

Copy file name to clipboardExpand all lines: plotly/tools.py
+8-5Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def warning_on_one_line(message, category, filename, lineno, file=None, line=Non
4949
_FILE_CONTENT = {CREDENTIALS_FILE: {'username': '',
5050
'api_key': '',
5151
'proxy_username': '',
52-
'proxy_passwd': '',
52+
'proxy_password': '',
5353
'api_key': '',
5454
'stream_ids': []},
5555
CONFIG_FILE: {'plotly_domain': 'https://plot.ly',
@@ -103,8 +103,11 @@ def ensure_local_plotly_files():
103103

104104
### credentials tools ###
105105

106-
def set_credentials_file(username=None, api_key=None, proxy_username=None,
107-
proxy_passwd=None, stream_ids=None):
106+
def set_credentials_file(username=None,
107+
api_key=None,
108+
stream_ids=None,
109+
proxy_username=None,
110+
proxy_password=None):
108111
"""Set the keyword-value pairs in `~/.plotly_credentials`.
109112
110113
:param (str) username: The username you'd use to sign in to Plotly
@@ -125,8 +128,8 @@ def set_credentials_file(username=None, api_key=None, proxy_username=None,
125128
credentials['api_key'] = api_key
126129
if isinstance(proxy_username, six.string_types):
127130
credentials['proxy_username'] = proxy_username
128-
if isinstance(proxy_passwd, six.string_types):
129-
credentials['proxy_passwd'] = proxy_passwd
131+
if isinstance(proxy_password, six.string_types):
132+
credentials['proxy_password'] = proxy_password
130133
if isinstance(stream_ids, (list, tuple)):
131134
credentials['stream_ids'] = stream_ids
132135
utils.save_json_dict(CREDENTIALS_FILE, credentials)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.