Author: aaugustin Date: 2012-01-28 10:18:01 -0800 (Sat, 28 Jan 2012) New Revision: 17401
Modified: django/trunk/django/contrib/admindocs/views.py Log: Fixed #12099 -- Prevented admindocs from crashing when an application that provides template tags libraries is packaged as an egg. These libraries will be ignored. Modified: django/trunk/django/contrib/admindocs/views.py =================================================================== --- django/trunk/django/contrib/admindocs/views.py 2012-01-28 01:50:14 UTC (rev 17400) +++ django/trunk/django/contrib/admindocs/views.py 2012-01-28 18:18:01 UTC (rev 17401) @@ -307,11 +307,14 @@ # Load/register all template tag libraries from installed apps. for module_name in template.get_templatetags_modules(): mod = import_module(module_name) - libraries = [ - os.path.splitext(p)[0] - for p in os.listdir(os.path.dirname(mod.__file__)) - if p.endswith('.py') and p[0].isalpha() - ] + try: + libraries = [ + os.path.splitext(p)[0] + for p in os.listdir(os.path.dirname(mod.__file__)) + if p.endswith('.py') and p[0].isalpha() + ] + except OSError: + libraries = [] for library_name in libraries: try: lib = template.get_library(library_name) -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.