From 0e669b81b0064b55fa9c28cf0a922c364e2ac367 Mon Sep 17 00:00:00 2001 From: "Maxime Alves LIRMM@home" Date: Wed, 30 Jun 2021 15:13:06 +0200 Subject: [PATCH] [domain] do not raise exception when the router is missing the ROUTES variable in halfapi/acls route --- halfapi/lib/domain.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/halfapi/lib/domain.py b/halfapi/lib/domain.py index 134f6f1..ca1358d 100644 --- a/halfapi/lib/domain.py +++ b/halfapi/lib/domain.py @@ -263,7 +263,8 @@ def router_acls(route_params: Dict, path: List, m_router: ModuleType) -> Generat def domain_acls(m_router, path): if not hasattr(m_router, 'ROUTES'): logger.error('Missing *ROUTES* constant in *%s*', m_router.__name__) - raise Exception(f'No ROUTES constant for {m_router.__name__}') + #raise Exception(f'No ROUTES constant for {m_router.__name__}') + return routes = m_router.ROUTES