Skip to content

Commit 0eed4eb

Browse files
committed
fix: fix errors in the exposed methods resolution
1 parent 02d16ec commit 0eed4eb

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/DIRAC/Core/Tornado/Server/TornadoREST.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@
44
"""
55

66
import os
7-
import inspect
87
from tornado.escape import json_decode
98
from tornado.web import url as TornadoURL
10-
from urllib.parse import unquote
11-
from functools import partial
129

13-
from DIRAC import gLogger
1410
from DIRAC.ConfigurationSystem.Client import PathFinder
1511
from DIRAC.Core.Tornado.Server.private.BaseRequestHandler import *
1612

@@ -171,7 +167,7 @@ def _pre_initialize(cls) -> list:
171167
"""
172168
urls = []
173169
# Look for methods that are exported
174-
for prefix in [cls.METHOD_PREFIX] if cls.METHOD_PREFIX else cls.SUPPORTED_METHODS:
170+
for prefix in [cls.METHOD_PREFIX] if cls.METHOD_PREFIX else [f"{pref}_" for pref in cls.SUPPORTED_METHODS]:
175171
prefix = prefix.lower()
176172
for mName, mObj in inspect.getmembers(cls, lambda x: callable(x) and x.__name__.startswith(prefix)):
177173
methodName = mName[len(prefix) :]
@@ -341,4 +337,4 @@ def post_note(self, pos_only, /, standard, *, kwd_only):
341337
# Wrap argument with annotated type
342338
keywordArguments[name] = _type(value) if _type else value
343339

344-
return (positionalArguments, keywordArguments)
340+
return positionalArguments, keywordArguments

0 commit comments

Comments
 (0)