Skip to content

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)