DataBiosphere / terra-notebook-utils

Utilities for the Terra notebook environment.
MIT License
7 stars 6 forks source link

Check if bucket is empty string #384

Closed aofarrel closed 2 years ago

aofarrel commented 2 years ago

os.environ.get('WORKSPACE_BUCKET') in list_bucket() is resulting in a 404 if the bucket name is not specified when this function is called. Based on the output I have a hunch os.environ.get('WORKSPACE_BUCKET') is returning an empty string.

A possible alternative to this based on get_access_token(), although I'm not sure if it would make a difference:

if os.environ.get('WORKSPACE_BUCKET'):
        bucket = os.environ['WORKSPACE_BUCKET']
DailyDreaming commented 2 years ago

@aofarrel os.environ.get('WORKSPACE_BUCKET') returns None btw, not an empty string.