mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
also raise url-import and init-errors in debug mode
This commit is contained in:
parent
cf03ee160a
commit
809dc4130a
@ -109,6 +109,8 @@ def _include_module_urls(module_name, namespace):
|
|||||||
r'', django.conf.urls.include(url_module, namespace)))
|
r'', django.conf.urls.include(url_module, namespace)))
|
||||||
except ImportError:
|
except ImportError:
|
||||||
LOGGER.debug('No URLs for %s', module_name)
|
LOGGER.debug('No URLs for %s', module_name)
|
||||||
|
if cfg.debug:
|
||||||
|
raise
|
||||||
|
|
||||||
|
|
||||||
def _initialize_module(module):
|
def _initialize_module(module):
|
||||||
@ -124,6 +126,8 @@ def _initialize_module(module):
|
|||||||
except Exception as exception:
|
except Exception as exception:
|
||||||
LOGGER.exception('Exception while running init for %s: %s',
|
LOGGER.exception('Exception while running init for %s: %s',
|
||||||
module, exception)
|
module, exception)
|
||||||
|
if cfg.debug:
|
||||||
|
raise
|
||||||
|
|
||||||
|
|
||||||
def get_template_directories():
|
def get_template_directories():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user