allow single access_token

This commit is contained in:
root 2019-01-21 00:39:58 +00:00
parent a7dabe6c1c
commit cf99e661fb

View File

@ -77,15 +77,15 @@ class MumbleBot:
password = var.config.get("server", "password") password = var.config.get("server", "password")
if args.tokens: if args.tokens:
tokens = args.tokens tokens = args.tokens
print(tokens)
else: else:
tokens = var.config.get("server", "tokens") tokens = var.config.get("server", "tokens")
access_tokens = [] access_tokens = []
if "," in tokens:
tokenslist = tokens.split(",") tokenslist = tokens.split(",")
for i in tokenslist: for i in tokenslist:
access_tokens.append(str(i)) access_tokens.append(str(i))
logging.info(access_tokens) else:
print(access_tokens) access_tokens.append(tokens)
if args.user: if args.user:
username = args.user username = args.user
else: else: