indent for auth file

This commit is contained in:
localhost_frssoft 2023-06-16 02:22:52 +03:00
parent 24acce9523
commit 765f5a192d

View File

@ -119,10 +119,10 @@ Read | Write (optional):
Insert token from "Access token" here''')
register_token = input()
with open('.auth.json', 'rt') as f:
tkns = json.loads(f.read())
tkns = json.load(f)
with open('.auth.json', 'wt') as f:
tkns[current_instance.instance] = register_token
f.write(json.dumps(tkns))
f.write(json.dumps(tkns, indent=4))
del tkns
del register_token
del f