mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-01-20 15:20:16 +01:00
fix indentation level
This commit is contained in:
parent
a74ef0fe45
commit
cea266709c
|
|
@ -109,19 +109,19 @@ def run(typ,freq,data):
|
|||
elif typ == "ZVEI":
|
||||
cursor.execute("INSERT INTO "+globalVars.config.get("MySQL","tableZVEI")+" (time, zvei, description) VALUES (FROM_UNIXTIME(%s),%s,%s)", (data["timestamp"], data["zvei"], data["description"]))
|
||||
|
||||
elif typ == "POC":
|
||||
elif typ == "POC":
|
||||
if isSignal(data["ric"]):
|
||||
if globalVars.config.getint("POC","netIdent_histry"):
|
||||
cursor.execute("INSERT INTO "+globalVars.config.get("MySQL","tableSIG")+" (time,ric) VALUES (NOW(), '"+data["ric"]+"');")
|
||||
else:
|
||||
cursor.execute("UPDATE "+globalVars.config.get("MySQL","tableSIG")+" SET time = NOW() WHERE ric = '"+data["ric"]+"';")
|
||||
if cursor.rowcount == 0:
|
||||
cursor.execute("INSERT INTO "+globalVars.config.get("MySQL","tableSIG")+" (time,ric) VALUES (NOW(), '"+data["ric"]+"');")
|
||||
cursor.execute("UPDATE "+globalVars.config.get("MySQL","tableSIG")+" SET time = NOW() WHERE ric = '"+data["ric"]+"';")
|
||||
if cursor.rowcount == 0:
|
||||
cursor.execute("INSERT INTO "+globalVars.config.get("MySQL","tableSIG")+" (time,ric) VALUES (NOW(), '"+data["ric"]+"');")
|
||||
else:
|
||||
cursor.execute("INSERT INTO "+globalVars.config.get("MySQL","tablePOC")+" (time, ric, function, functionChar, msg, bitrate, description) VALUES (FROM_UNIXTIME(%s),%s,%s,%s,%s,%s,%s)", (data["timestamp"], data["ric"], data["function"], data["functionChar"], data["msg"], data["bitrate"], data["description"]))
|
||||
cursor.execute("INSERT INTO "+globalVars.config.get("MySQL","tablePOC")+" (time, ric, function, functionChar, msg, bitrate, description) VALUES (FROM_UNIXTIME(%s),%s,%s,%s,%s,%s,%s)", (data["timestamp"], data["ric"], data["function"], data["functionChar"], data["msg"], data["bitrate"], data["description"]))
|
||||
|
||||
else:
|
||||
logging.warning("Invalid Typ: %s", typ)
|
||||
else:
|
||||
logging.warning("Invalid Typ: %s", typ)
|
||||
except:
|
||||
logging.error("cannot Insert %s", typ)
|
||||
logging.debug("cannot Insert %s", typ, exc_info=True)
|
||||
|
|
|
|||
Loading…
Reference in a new issue