Reformat code with pre-commit
This commit is contained in:
@@ -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]]))
|
||||
|
||||
Reference in New Issue
Block a user