Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions kagglesdk/kaggle_http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ def _get_apikey_creds():
if not kaggle_json or not kaggle_json.strip():
return None

api_key_data = json.loads(kaggle_json)
username = api_key_data["username"]
api_key = api_key_data["key"]
return username, api_key
try:
"Be careful, since the file may be used for more than credential storage."
api_key_data = json.loads(kaggle_json)
username = api_key_data["username"]
api_key = api_key_data["key"]
return username, api_key
except KeyError as e:
return None


class KaggleHttpClient(object):
Expand Down