mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
raise module exceptions in DEBUG mode
This commit is contained in:
parent
0d5636a900
commit
cf03ee160a
@ -25,6 +25,7 @@ import logging
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
import urls
|
import urls
|
||||||
|
import cfg
|
||||||
|
|
||||||
LOGGER = logging.getLogger(__name__)
|
LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -47,6 +48,8 @@ def load_modules():
|
|||||||
except Exception as exception:
|
except Exception as exception:
|
||||||
LOGGER.exception('Could not import modules/%s: %s',
|
LOGGER.exception('Could not import modules/%s: %s',
|
||||||
name, exception)
|
name, exception)
|
||||||
|
if cfg.debug:
|
||||||
|
raise
|
||||||
|
|
||||||
_include_module_urls(full_name, name)
|
_include_module_urls(full_name, name)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user