Fixed crashes

This commit is contained in:
strongleong 2023-02-07 19:38:24 +11:00
parent 7a34fd006b
commit 40e264083f
7 changed files with 114 additions and 39 deletions

View file

@ -9,10 +9,22 @@ import SAct
import sys
logger = None
Scrap.Print("[STRNG][Police] 0" + "\n")
try:
logger = __import__("Logger").Logger("Police")
except Exception:
pass
def log(msg):
Scrap.Print("[STRNG][Police] " + str(msg) + "\n")
if logger is not None:
logger.info(msg)
else:
Scrap.Print("[STRNG][Police] " + str(msg) + "\n")
log("Starting module")
# WARNING : Never import any pyhton source library at the start up!