Skip to content

Commit e850f6c

Browse files
authored
Create the credentials folder if it doesn't exist (#100)
1 parent cb917d6 commit e850f6c

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

centml/cli/login.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import hashlib
33
from http.server import BaseHTTPRequestHandler, HTTPServer
44
import json
5+
import os
56
import secrets
67
import urllib.parse
78
import webbrowser
@@ -122,6 +123,7 @@ def login(token_file):
122123
cred = {
123124
key: response_dict[key] for key in ("access_token", "refresh_token") if key in response_dict
124125
}
126+
os.makedirs(os.path.dirname(settings.CENTML_CRED_FILE_PATH), exist_ok=True)
125127
with open(settings.CENTML_CRED_FILE_PATH, "w") as f:
126128
json.dump(cred, f)
127129
click.echo("✅ Login successful")

scripts/lint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash -e
22

33
# run pylint
4-
python -m pylint --rcfile ./scripts/pylintrc -j $(nproc) ./centml ./tests
4+
python -m pylint --rcfile ./scripts/pylintrc ./centml ./tests

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
setup(
1313
name='centml',
14-
version='0.4.0',
14+
version='0.4.1',
1515
packages=find_packages(),
1616
python_requires=">=3.10",
1717
long_description=open('README.md').read(),

0 commit comments

Comments
 (0)