Commit a66ae2c0 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

Handle errors when loading db interfaces

parent 7f6b1f36
Pipeline #20733 passed with stage
in 50 minutes and 5 seconds
......@@ -174,16 +174,19 @@ def create_parser(**kwargs):
try:
entrypoint.load()
except Exception:
logger.warning("Failed to load `%s' from installed bob.db entrypoints",
logger.error("Failed to load `%s' from installed bob.db entrypoints",
entrypoint.name, exc_info=True)
# at this point we should have loaded all databases
from .driver import Interface
all_modules = []
for plugin in Interface.__subclasses__():
driver = plugin()
driver.add_commands(subparsers)
all_modules.append(driver)
try:
driver = plugin()
driver.add_commands(subparsers)
all_modules.append(driver)
except Exception:
logger.error('Failed to load db interface %s', plugin, exc_info=1)
add_all_commands(parser, subparsers, all_modules) #inserts the master driver
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment