Reformat code with pre-commit

This commit is contained in:
2022-07-21 13:39:41 +01:00
parent 0777a55264
commit ff1ee63900
60 changed files with 547 additions and 278 deletions

View File

@@ -2,6 +2,7 @@ import main
from yaml import dump
from uuid import uuid4
class TokenCommand:
def __init__(self, *args):
self.token(*args)
@@ -31,11 +32,12 @@ class TokenCommand:
elif length == 4:
if spl[1] == "add":
if not spl[2] in main.tokens.keys():
if spl[3] in ["relay"]: # more to come!
main.tokens[spl[2]] = {"hello": str(uuid4()),
"usage": spl[3],
"counter": str(uuid4()),
}
if spl[3] in ["relay"]: # more to come!
main.tokens[spl[2]] = {
"hello": str(uuid4()),
"usage": spl[3],
"counter": str(uuid4()),
}
main.saveConf("tokens")
success("Successfully created token %s:" % spl[2])
info(dump(main.tokens[spl[2]]))