-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Is your feature request related to a problem? Please describe.
The majority of scripts will check if a user already has an access token or create it for the user.
The code that does this is repeated throughout the place. i.e.,
Lines 49 to 60 in db55abb
| agave = Agave() | |
| config_file = "{}/config.json".format(cache_dir) | |
| # Check if there is a session already saved. | |
| if os.path.exists(config_file): | |
| agave.load_configs(cache_dir=cache_dir) | |
| else: | |
| print("You need to initiate a session first. Use auth-sessions-init") | |
| sys.exit(1) | |
| # Refresh tokens if necessary. | |
| agave.refresh_tokens() |
Describe the solution you'd like
This could all very well be organized into a function, login(), that all other scripts can import.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed