Compare commits
No commits in common. "b076bfc71aa7111297a9ce2d491391270ff07214" and "971915faf476407863087678645d225284f7cfa8" have entirely different histories.
b076bfc71a
...
971915faf4
6
db.py
6
db.py
@ -7,15 +7,9 @@ if not os.path.exists('config.json'):
|
||||
with open("config.json", "w") as outfile:
|
||||
outfile.write(js)
|
||||
print('Created new config.json')
|
||||
exit()
|
||||
|
||||
|
||||
def read(file = 'config.json'):
|
||||
if not os.path.exists(file):
|
||||
with open(file, "w") as f:
|
||||
f.write("{}")
|
||||
f.close()
|
||||
|
||||
with open(file, "r", encoding="utf-8") as openfile:
|
||||
db = json.load(openfile)
|
||||
return db
|
||||
|
Loading…
Reference in New Issue
Block a user