Skip to content

Commit d64e975

Browse files
committed
fix: do not look anymore for __RCSID__
1 parent a417797 commit d64e975

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/DIRAC/Core/Base/AgentModule.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,18 +154,16 @@ def __init__(self, agentName, loadName, baseAgentName=False, properties={}):
154154
self.__initialized = False
155155

156156
def __getCodeInfo(self):
157-
versionVar = "__RCSID__"
158157
docVar = "__doc__"
159158
try:
160-
self.__agentModule = __import__(self.__class__.__module__, globals(), locals(), versionVar)
159+
self.__agentModule = __import__(self.__class__.__module__, globals(), locals(), "__doc__")
161160
except Exception as excp:
162161
self.log.exception("Cannot load agent module", lException=excp)
163-
for prop in ((versionVar, "version"), (docVar, "description")):
164-
try:
165-
self.__codeProperties[prop[1]] = getattr(self.__agentModule, prop[0])
166-
except Exception:
167-
self.log.error("Missing property", prop[0])
168-
self.__codeProperties[prop[1]] = "unset"
162+
try:
163+
self.__codeProperties["description"] = getattr(self.__agentModule, "__doc__")
164+
except Exception:
165+
self.log.error("Missing property __doc__")
166+
self.__codeProperties["description"] = "unset"
169167
self.__codeProperties["DIRACVersion"] = DIRAC.version
170168
self.__codeProperties["platform"] = DIRAC.getPlatform()
171169

0 commit comments

Comments
 (0)