#4478: [patch] PIL Bug Causes Django 0.96 Image Validator to Break if OLE 
Document
Uploaded
---------------------------------+------------------------------------------
   Reporter:  [EMAIL PROTECTED]  |                Owner:  adrian                
     Status:  new                |            Component:  Validators            
    Version:  0.96               |           Resolution:                        
   Keywords:  image validator    |                Stage:  Design decision needed
  Has_patch:  1                  |           Needs_docs:  0                     
Needs_tests:  0                  |   Needs_better_patch:  0                     
---------------------------------+------------------------------------------
Changes (by anonymous):

 * cc: [EMAIL PROTECTED] (added)
  * has_patch:  0 => 1
  * summary:  PIL Bug Causes Django 0.96 Image Validator to Break if OLE
              Document Uploaded => [patch] PIL Bug Causes
              Django 0.96 Image Validator to Break if OLE
              Document Uploaded

Comment:

 Applyed this patch to my django project and it works fine.
 
 I'm +1 on including this
 
 only recommand that we change the except to:
 {{{
 except (IOError, OverflowError): # Python Imaging Library doesn't
 recognize it as an image
 }}}
 
 so it's less confusing towards except Exception, e: and future Python
 versions.
 
 p.s. i don't think this is a design decision, this is a bug in PIL and we
 should capture the OverFlow acception.
 as it tells the application, something went wrong in trying to read the
 image (OLE object in this case)

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4478#comment:2>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to