Reformat code

This commit is contained in:
Mark Veidemanis 2022-07-29 17:28:19 +01:00
parent 75f79cf072
commit 4472352785
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
2 changed files with 6 additions and 16 deletions

View File

@ -5,7 +5,6 @@ from os.path import exists
from string import digits
from redis import StrictRedis
from os import getenv
# List of errors ZNC can give us
ZNCErrors = ["Error:", "Unable to load", "does not exist", "doesn't exist"]

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python
import sys
from codecs import getwriter
from os import getenv
from signal import SIGINT, signal
from sys import stderr, stdout
@ -19,7 +20,6 @@ from core.server import ServerFactory
from utils.cleanup import handler
from utils.loaders.command_loader import loadCommands
from utils.logging.log import log
from os import getenv
Factory.noisy = False
@ -39,7 +39,7 @@ stdout = getwriter("utf8")(stdout) # this is a generic fix but we all know
stderr = getwriter("utf8")(stderr) # it's just for the retards on Rizon using
# unicode quit messages for no reason
trues = ('true', '1', 't', True)
trues = ("true", "1", "t", True)
# Main listener
listener_address = getenv("THRESHOLD_LISTENER_HOST", main.config["Listener"]["Address"])
@ -71,10 +71,7 @@ if __name__ == "__main__":
),
interface=listener_address,
)
log(
"Threshold running with SSL on %s:%s"
% (listener_address, listener_port)
)
log("Threshold running with SSL on %s:%s" % (listener_address, listener_port))
else:
reactor.listenTCP(
listener_port,
@ -94,20 +91,14 @@ if __name__ == "__main__":
),
interface=relay_address,
)
log(
"Threshold relay running with SSL on %s:%s"
% (relay_address, relay_port)
)
log("Threshold relay running with SSL on %s:%s" % (relay_address, relay_port))
else:
reactor.listenTCP(
relay_port,
relay,
interface=relay_address,
)
log(
"Threshold relay running on %s:%s"
% (relay_address, relay_port)
)
log("Threshold relay running on %s:%s" % (relay_address, relay_port))
for net in main.network.keys():
main.network[net].start_bots()
modules.counters.setupCounterLoop()