Skip to content
This repository was archived by the owner on Mar 30, 2026. It is now read-only.

Commit 2cc030c

Browse files
committed
Merge branch 'release-1.1.0' of github.com:sserrata/pancloud into release-1.1.0
2 parents e6caa54 + 025504d commit 2cc030c

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

pancloud/credentials.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,11 @@ def __init__(self, auth_base_url=None, client_id=None, client_secret=None,
7979
self.token_lock = Lock()
8080
self.token_url = token_url or TOKEN_URL
8181
self.token_revoke_url = token_revoke_url or REVOKE_URL
82-
if not os.path.exists(os.path.join(
83-
os.path.expanduser('~'), '.config')
84-
):
85-
os.mkdir(os.path.join(os.path.expanduser('~'), '.config'))
8682
if not os.path.exists(os.path.dirname(self.path)):
87-
os.mkdir(os.path.dirname(self.path))
83+
try:
84+
os.makedirs(os.path.dirname(self.path), 0o700)
85+
except OSError as e:
86+
raise PanCloudError("{}".format(e))
8887
self.db = TinyDB(self.path, sort_keys=True, indent=4,
8988
default_table='profiles')
9089
self.query = Query()

0 commit comments

Comments
 (0)