create data folder on startup
This commit is contained in:
parent
5021be2982
commit
ea3c737c04
1 changed files with 2 additions and 0 deletions
2
main.py
2
main.py
|
@ -21,6 +21,8 @@ def make_resp(data=''):
|
|||
|
||||
index = json.load(open("index.json", "r", encoding="utf-8"))
|
||||
|
||||
os.makedirs("data", exist_ok=True)
|
||||
|
||||
def save_index():
|
||||
with open("index.json", "w+") as f:
|
||||
json.dump(index, f, indent=4)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue