Skip to content

Commit

Permalink
Merge pull request #925 from benhoman/create_config_dir_if_not_exists
Browse files Browse the repository at this point in the history
Create default config directory if not exists
  • Loading branch information
lavigne958 authored Sep 8, 2021
2 parents ea353e4 + 5afb5fc commit 52feb9a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gspread/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def load_credentials(filename=DEFAULT_AUTHORIZED_USER_FILENAME):


def store_credentials(creds, filename=DEFAULT_AUTHORIZED_USER_FILENAME, strip="token"):
os.makedirs(os.path.dirname(filename), exist_ok=True)
with open(filename, "w") as f:
f.write(creds.to_json(strip))

Expand Down

0 comments on commit 52feb9a

Please sign in to comment.