Skip to content

Fix a type error in Kaggle notebook auto-auth flow #826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
8 changes: 4 additions & 4 deletions src/kagglesdk/kaggle_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,18 @@ def is_in_kaggle_notebook() -> bool:

def _get_access_token_from_file(path):
if not path:
return (None, None)
return None

token_path = Path(path)
if not token_path.exists():
return (None, None)
return None

token_value = token_path.read_text().strip()
if not token_value:
return (None, None)
return None

get_logger().debug(f'Using access token from file: "{path}"')
return (token_value, path)
return token_value


def get_access_token_from_env():
Expand Down