#26297: collectstatic --clear throws NotImplementedError, "This backend doesn't
support absolute paths."
------------------------------+--------------------------------------------
     Reporter:  topher86      |      Owner:  nobody
         Type:  Bug           |     Status:  new
    Component:                |    Version:  1.9
  contrib.staticfiles         |
     Severity:  Normal        |   Keywords:  clear notimplementederror path
 Triage Stage:  Unreviewed    |  Has patch:  1
Easy pickings:  1             |      UI/UX:  0
------------------------------+--------------------------------------------
 storage.py docstrings state of storage.path()
 >Storage systems that can't be accessed using open() should *not*
 implement this method.

 collectstatic.py does not catch this to use the implemented
 storage.delete() method on line 221


 {{{
 #!div style="font-size: 80%"
 Code highlighting:
   {{{#!python
                 full_path = self.storage.path(fpath)
                 if not os.path.exists(full_path) and
 os.path.lexists(full_path):
                     # Delete broken symlinks
                     os.unlink(full_path)
                 else:
                     self.storage.delete(fpath)
   }}}
 }}}

 Patch?:

 {{{
 #!div style="font-size: 80%"
 Code highlighting:
   {{{#!python
                 try:
                     full_path = self.storage.path(fpath)
                     if not os.path.exists(full_path) and
 os.path.lexists(full_path):
                         # Delete broken symlinks
                         os.unlink(full_path)
                     else:
                         self.storage.delete(fpath)
                 except NotImplementedError:
                     self.storage.delete(fpath)
   }}}
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26297>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.acb9c352a4e92476b7c90c0f27e38505%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to