Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Beairsto committed Dec 17, 2018
1 parent f6a1b3e commit aafe34e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions datarobot_batch_scoring/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ def parse_config_file(file_path):
return config_validator(parsed_dict)


def acquire_api_token(base_url, base_headers, user, pwd, create_api_token, ui, verify_ssl):
def acquire_api_token(base_url, base_headers, user, pwd,
create_api_token, ui, verify_ssl):
"""Get the api token.
Either supplied by user or requested from the API with username and pwd.
Expand All @@ -286,7 +287,11 @@ def acquire_api_token(base_url, base_headers, user, pwd, create_api_token, ui, v
else:
request_meth = requests.get

r = request_meth(base_url + 'api_token', auth=auth, headers=base_headers, verify=verify_ssl)
r = request_meth(base_url + 'api_token',
auth=auth,
headers=base_headers,
verify=verify_ssl)

if r.status_code == 401:
raise ValueError('wrong credentials')
elif r.status_code != 200:
Expand Down

0 comments on commit aafe34e

Please sign in to comment.