@@ -67,7 +67,7 @@ class AgentModule:
67
67
def __init__ (self , agentName , loadName , baseAgentName = False , properties = {}):
68
68
"""
69
69
Common __init__ method for all Agents.
70
- All Agent modules must define: __doc__
70
+ All Agent modules must define: __doc__
71
71
72
72
They are used to populate __codeProperties
73
73
@@ -146,26 +146,26 @@ def __init__(self, agentName, loadName, baseAgentName=False, properties={}):
146
146
self .__monitorLastStatsUpdate = - 1
147
147
self .monitor = None
148
148
self .__initializeMonitor ()
149
- self .__initialized = False
149
+ self .__initialized = False
150
150
151
151
def __getCodeInfo (self ):
152
152
153
- try :
154
- self .__codeProperties ["version" ] = importlib .metadata .version (
155
- inspect .getmodule (self ).__package__ .split ("." )[0 ]
156
- )
157
- except Exception :
158
- self .log .exception (f"Failed to find version for { self !r} " )
159
- self .__codeProperties ["version" ] = "unset"
160
- try :
161
- self .__agentModule = __import__ (self .__class__ .__module__ , globals (), locals (), "__doc__" )
162
- except Exception as excp :
153
+ try :
154
+ self .__codeProperties ["version" ] = importlib .metadata .version (
155
+ inspect .getmodule (self ).__package__ .split ("." )[0 ]
156
+ )
157
+ except Exception :
158
+ self .log .exception (f"Failed to find version for { self !r} " )
159
+ self .__codeProperties ["version" ] = "unset"
160
+ try :
161
+ self .__agentModule = __import__ (self .__class__ .__module__ , globals (), locals (), "__doc__" )
162
+ except Exception as excp :
163
163
self .log .exception ("Cannot load agent module" , lException = excp )
164
- try :
165
- self .__codeProperties ["description" ] = getattr (self .__agentModule , "__doc__" )
166
- except Exception :
167
- self .log .error ("Missing property __doc__" )
168
- self .__codeProperties ["description" ] = "unset"
164
+ try :
165
+ self .__codeProperties ["description" ] = getattr (self .__agentModule , "__doc__" )
166
+ except Exception :
167
+ self .log .error ("Missing property __doc__" )
168
+ self .__codeProperties ["description" ] = "unset"
169
169
self .__codeProperties ["DIRACVersion" ] = DIRAC .version
170
170
self .__codeProperties ["platform" ] = DIRAC .getPlatform ()
171
171
0 commit comments