#23525: admin/docs/filters|tags __file__ attribute errors for egg extensions
-------------------------------------+-------------------------------------
     Reporter:  welbornprod          |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  contrib.admindocs    |                  Version:  1.7
     Severity:  Normal               |               Resolution:
     Keywords:  __file__             |             Triage Stage:  Accepted
  AttributeError filters tags        |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  1
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  1                    |
-------------------------------------+-------------------------------------

Comment (by welbornprod):

 Here is a new patch with the suggested changes. It catches
 `AttributeError` when calculating the directory, if it fails then
 `continue` is used.

 On success it will `try` to list the files in that directory.

 I used an `else` on the this `try`, so the `libraries` list is used only
 when it is successfully initialized. The old method to skip/continue on
 `OSError` was to set `libraries` to an empty list which would then be
 skipped automatically with the `for` loop. The new method uses an actual
 `continue`.

--
Ticket URL: <https://code.djangoproject.com/ticket/23525#comment:4>
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/069.acdf2ea49b145f61bc6eea399bde5187%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to