cleaned trailing spaces

This commit is contained in:
Maxime Alves LIRMM@home 2020-07-28 09:46:21 +02:00
parent e4d0b6c17e
commit ad3792340c
2 changed files with 7 additions and 7 deletions

View File

@ -89,7 +89,7 @@ def dbupdate(domain):
def get_fct_name(http_verb, path):
if path[0] != '/':
raise Exception('Malformed path')
elts = [] if len(path) == 1 else path[1:].split('/')
fct_name = [http_verb.lower()]
@ -98,7 +98,7 @@ def dbupdate(domain):
fct_name.append(elt[1:-1].split(':')[0].upper())
else:
fct_name.append(elt)
return '_'.join(fct_name)
@ -122,7 +122,7 @@ def dbupdate(domain):
if len(route) == 0:
route.insert()
add_acls(acls, **route.to_dict())

View File

@ -39,9 +39,9 @@ def get_routes(domains=None):
return func(req, *args, **kwargs)
raise HTTPException(401)
return caller
app_routes = []
for domain in Domain(name=domains).select():
domain_acl_mod = importlib.import_module(f'{domain["name"]}.acl')
@ -51,7 +51,7 @@ def get_routes(domains=None):
router_mod = importlib.import_module(
'{domain}.routers.{name}'.format(**router))
with APIRoute(domain=domain['name'],
router=router['name']) as routes:
for route in routes.select():
@ -67,7 +67,7 @@ def get_routes(domains=None):
acls
), methods=[route['http_verb']])
)
domain_routes.append(
Mount('/{name}'.format(**router), routes=router_routes))