Skip to content

Commit 73d7d5f

Browse files
committed
sweep: #7272 create client get functions from HandlerMixins
Merge pull request #7273 from DIRACGridBot/cherry-pick-2-6d71e45f6-integration
1 parent 0b55787 commit 73d7d5f

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

src/DIRAC/Core/Base/Client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ def addFunctions(clientCls):
159159

160160
# loop over all the nodes (classes, functions, imports) in the handlerModule
161161
for node in ast.iter_child_nodes(handlerAst):
162-
# find only a class with the name of the handlerClass
163-
if not (isinstance(node, ast.ClassDef) and node.name == handlerClassName):
162+
# find only a class that starts with the name of the handlerClass
163+
if not (isinstance(node, ast.ClassDef) and node.name.startswith(handlerClassName)):
164164
continue
165165
for member in ast.iter_child_nodes(node):
166166
# only look at functions

src/DIRAC/FrameworkSystem/Client/SystemAdministratorClientCLI.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,15 @@
2020
from DIRAC.Core.Utilities.PrettyPrint import printTable
2121
from DIRAC.Core.Utilities.PromptUser import promptUser
2222
from DIRAC.FrameworkSystem.Client.ComponentInstaller import gComponentInstaller
23-
from DIRAC.FrameworkSystem.Client.ComponentMonitoringClient import ComponentMonitoringClient
24-
from DIRAC.FrameworkSystem.Client.SystemAdministratorClient import SystemAdministratorClient
25-
from DIRAC.FrameworkSystem.Client.SystemAdministratorIntegrator import SystemAdministratorIntegrator
23+
from DIRAC.FrameworkSystem.Client.ComponentMonitoringClient import (
24+
ComponentMonitoringClient,
25+
)
26+
from DIRAC.FrameworkSystem.Client.SystemAdministratorClient import (
27+
SystemAdministratorClient,
28+
)
29+
from DIRAC.FrameworkSystem.Client.SystemAdministratorIntegrator import (
30+
SystemAdministratorIntegrator,
31+
)
2632
from DIRAC.FrameworkSystem.Utilities import MonitoringUtilities
2733
from DIRAC.MonitoringSystem.Client.MonitoringClient import MonitoringClient
2834

@@ -199,7 +205,7 @@ def do_show(self, args):
199205
for component in components:
200206
record = []
201207
if rDict[compType][system][component]["Installed"]:
202-
module = str(rDict[compType][system][component]["DIRACModule"])
208+
module = str(rDict[compType][system][component]["Module"])
203209
record += [system, component, module, compType.lower()[:-1]]
204210
if rDict[compType][system][component]["Setup"]:
205211
record += ["Setup"]

0 commit comments

Comments
 (0)