Fix bug where no content-type is provided in a message part
This commit is contained in:
@@ -122,6 +122,10 @@ def receive_report(args):
|
|||||||
for part in msg.walk():
|
for part in msg.walk():
|
||||||
# check for zip file
|
# check for zip file
|
||||||
content_type = part['content-type']
|
content_type = part['content-type']
|
||||||
|
|
||||||
|
if content_type is None:
|
||||||
|
continue
|
||||||
|
|
||||||
if content_type.find(';') != -1:
|
if content_type.find(';') != -1:
|
||||||
content_type = content_type.split(';',1)[0]
|
content_type = content_type.split(';',1)[0]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user