Reformat project

This commit is contained in:
2022-07-21 13:40:05 +01:00
parent 4ecb37b179
commit 2fecd98978
44 changed files with 363 additions and 236 deletions

View File

@@ -3,11 +3,11 @@ from twisted.internet.task import LoopingCall
def event(name, eventType):
if not "local" in main.counters.keys():
if "local" not in main.counters.keys():
main.counters["local"] = {}
if not "global" in main.counters.keys():
if "global" not in main.counters.keys():
main.counters["global"] = {}
if not name in main.counters["local"].keys():
if name not in main.counters["local"].keys():
main.counters["local"][name] = {}
if eventType not in main.counters["local"][name].keys():
main.counters["local"][name][eventType] = 0
@@ -21,7 +21,7 @@ def event(name, eventType):
def getEvents(name=None):
if name == None:
if name is None:
if "global" in main.counters.keys():
return main.counters["global"]
else: