Skip to content

Commit

Permalink
rearrange flow to remove reference to creds
Browse files Browse the repository at this point in the history
  • Loading branch information
alifeee committed Oct 25, 2024
1 parent 1960c29 commit f8cc057
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gspread/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,10 @@ def oauth_from_dict(

if authorized_user_info is not None:
creds = OAuthCredentials.from_authorized_user_info(authorized_user_info, scopes)

if not creds and credentials is not None:
elif credentials is not None:
creds = flow(client_config=credentials, scopes=scopes)
else:
raise ValueError("no credentials object supplied")

client = Client(auth=creds, http_client=http_client)

Expand Down

0 comments on commit f8cc057

Please sign in to comment.