Skip to content
Snippets Groups Projects
Commit 0672e0af authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'dup.AthenaCommon-20190514' into 'master'

AthenaCommon: Workaround issue mixing old/new configurations.

See merge request atlas/athena!23424
parents ae96fb22 15eb8355
No related branches found
No related tags found
No related merge requests found
...@@ -75,6 +75,14 @@ def iadd( self, tool ): ...@@ -75,6 +75,14 @@ def iadd( self, tool ):
tool = (tool,) tool = (tool,)
# only add once (allow silently) # only add once (allow silently)
if self.configurableRun3Behavior:
# But if duplicates may not be the same Configurable instances,
# need to force the owner to prevent errors about public tools
# not in ToolSvc when old configuration fragments are imported
# in new configurations.
dups = [t for t in tool if t in self.getChildren()]
for t in dups:
t.setParent (self.name())
tool = [t for t in tool if t not in self.getChildren()] tool = [t for t in tool if t not in self.getChildren()]
if len(tool)==0: return self if len(tool)==0: return self
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment