mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Fixed #21443 -- Cannot show debug info on PY3's importlib
Thanks productions@zaziork.co.uk for the review.
This commit is contained in:
committed by
Claude Paroz
parent
47afe07324
commit
18185724e6
@@ -388,7 +388,10 @@ class ExceptionReporter(object):
|
||||
"""
|
||||
source = None
|
||||
if loader is not None and hasattr(loader, "get_source"):
|
||||
source = loader.get_source(module_name)
|
||||
try:
|
||||
source = loader.get_source(module_name)
|
||||
except ImportError:
|
||||
pass
|
||||
if source is not None:
|
||||
source = source.splitlines()
|
||||
if source is None:
|
||||
|
||||
Reference in New Issue
Block a user