|
@@ -41,14 +41,14 @@ class MailImport:
|
|
|
|
|
|
def get_status_message(self, msg: MailMessage) -> StatusMeldung:
|
|
|
subject = msg.subject.split(";")
|
|
|
- if len(subject) < 5:
|
|
|
- print(msg.subject)
|
|
|
- return None
|
|
|
-
|
|
|
attachments = dict([(att.filename, att.payload) for att in msg.attachments if att.size > 0])
|
|
|
fehlerbericht_json = json.loads(attachments.get("fehlerbericht.json", "[]"))
|
|
|
fehlerbericht_import = json.dumps(fehlerbericht_json)
|
|
|
|
|
|
+ if len(subject) < 5 or len(attachments) == 0 or len(fehlerbericht_json) == 0:
|
|
|
+ print(msg.subject)
|
|
|
+ return None
|
|
|
+
|
|
|
aufgabe = ""
|
|
|
if len(subject) > 5:
|
|
|
if subject[5][-4:] == ".bat":
|