|
@@ -1,12 +1,13 @@
|
|
|
-import re
|
|
|
-from config import DSN, DEBUG
|
|
|
-from model import StatusMeldung
|
|
|
-from logfiles.systeminfo_log import SysteminfoLog
|
|
|
import json
|
|
|
import os
|
|
|
+import re
|
|
|
+from datetime import date, timedelta
|
|
|
+
|
|
|
+from config import DEBUG, DSN
|
|
|
+from logfiles.systeminfo_log import SysteminfoLog
|
|
|
+from model import StatusMeldung
|
|
|
from sqlalchemy import create_engine, select
|
|
|
from sqlalchemy.orm import Session
|
|
|
-from datetime import date, timedelta
|
|
|
|
|
|
|
|
|
class PrepareLogfiles:
|
|
@@ -104,7 +105,7 @@ class PrepareLogfiles:
|
|
|
report["ErrorLevel"] = 3
|
|
|
sm.anzahl -= 1
|
|
|
|
|
|
- sm.anzahl = max(0, sm.anzahl)
|
|
|
+ sm.anzahl = len([e for e in fehlerbericht.values() if int(e["ErrorLevel"]) <= 2])
|
|
|
sm.fehlerbericht = json.dumps(list(fehlerbericht.values()), indent=2)
|
|
|
# self.export_log_files(sm, fehlerbericht)
|
|
|
# batch_log = [f for f in fehlerbericht if ".bat" in f["Name"]].pop(0)
|