summaryrefslogtreecommitdiff
path: root/django/http
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2007-02-26 18:52:15 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2007-02-26 18:52:15 +0000
commitcb1ff2af35bd983dadabfbfbc882c326bd22bab5 (patch)
tree2579b87a6d30e7fcab7b6d594f08c91e8e822f85 /django/http
parent2cd6db682f1964e4249b747ebbf1519a8e47efd1 (diff)
Fixed another Python 2.3 bug (this one on django.http.parse_file_upload). I think there's one left.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4615 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/http')
-rw-r--r--django/http/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/http/__init__.py b/django/http/__init__.py
index a6538b7d4a..0ae90c4921 100644
--- a/django/http/__init__.py
+++ b/django/http/__init__.py
@@ -52,7 +52,7 @@ def parse_file_upload(header_dict, post_data):
POST = MultiValueDict()
FILES = MultiValueDict()
for submessage in msg.get_payload():
- if isinstance(submessage, email.Message.Message):
+ if submessage and isinstance(submessage, email.Message.Message):
name_dict = parse_header(submessage['Content-Disposition'])[1]
# name_dict is something like {'name': 'file', 'filename': 'test.txt'} for file uploads
# or {'name': 'blah'} for POST fields