From 548cc66c52845150e669bc7c6e1f3a697ec01512 Mon Sep 17 00:00:00 2001 From: Adam Coddington Date: Sat, 22 Jun 2013 17:44:55 -0700 Subject: [PATCH] Incorporating changes from @mancio's fork. --- django_mailbox/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django_mailbox/models.py b/django_mailbox/models.py index 09f22d4..94dddd9 100755 --- a/django_mailbox/models.py +++ b/django_mailbox/models.py @@ -223,7 +223,8 @@ class Mailbox(models.Model): if part.get('Content-Disposition') is None: continue filename = part.get_filename() - # ignore SMIME extension + if not filename: + continue filename_basename, filename_extension = os.path.splitext( filename )