8000 create creds_store if not exist · progressify/wp-api-python@c3137dd · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c3137dd

Browse files
author
derwentx
committed
create creds_store if not exist
1 parent 30ca16a commit c3137dd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

wordpress/auth.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,9 @@ def store_access_creds(self):
612612
if self.access_token_secret:
613613
creds['access_token_secret'] = self.access_token_secret
614614
if creds:
615+
dirname = os.path.dirname(self.creds_store)
616+
if not os.path.exists(dirname):
617+
os.mkdir(dirname)
615618
with open(self.creds_store, 'w+') as creds_store_file:
616619
StrUtils.to_binary(
617620
json.dump(creds, creds_store_file, ensure_ascii=False))

0 commit comments

Comments
 (0)
0