Reformat project
This commit is contained in:
9
main.py
9
main.py
@@ -4,8 +4,6 @@ from redis import StrictRedis
|
||||
from string import digits
|
||||
from os import urandom
|
||||
|
||||
from utils.logging.log import *
|
||||
|
||||
# List of errors ZNC can give us
|
||||
ZNCErrors = ["Error:", "Unable to load", "does not exist", "doesn't exist"]
|
||||
|
||||
@@ -59,11 +57,12 @@ lastMinuteSample = 0
|
||||
hashKey = urandom(16)
|
||||
lastEvents = {}
|
||||
|
||||
|
||||
# Get networks that are currently online and dedupliate
|
||||
def liveNets():
|
||||
networks = set()
|
||||
for i in IRCPool.keys():
|
||||
networks.add("".join([x for x in i if not x in digits]))
|
||||
networks.add("".join([x for x in i if x not in digits]))
|
||||
return networks
|
||||
|
||||
|
||||
@@ -107,6 +106,6 @@ def initMain():
|
||||
global r, g
|
||||
initConf()
|
||||
r = StrictRedis(
|
||||
unix_socket_path=config["RedisSocket"], db=config["RedisDBEphemeral"]
|
||||
unix_socket_path=config["RedisSocket"], db=config["RedisDBEphemeral"] # noqa
|
||||
) # Ephemeral - flushed on quit
|
||||
g = StrictRedis(unix_socket_path=config["RedisSocket"], db=config["RedisDBPersistent"]) # Persistent
|
||||
g = StrictRedis(unix_socket_path=config["RedisSocket"], db=config["RedisDBPersistent"]) # noqa
|
||||
|
||||
Reference in New Issue
Block a user