diff options
Diffstat (limited to 'django/views/debug.py')
| -rw-r--r-- | django/views/debug.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/django/views/debug.py b/django/views/debug.py index 21e2eac06b..b723b9dcc5 100644 --- a/django/views/debug.py +++ b/django/views/debug.py @@ -376,7 +376,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: |
