Skip to content

Commit

Permalink
Print warning from python if non-default MessageLogger is used in a S…
Browse files Browse the repository at this point in the history
…ubProcess
  • Loading branch information
makortel committed Sep 17, 2021
1 parent fc16ab2 commit deafbcc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions FWCore/ParameterSet/python/Config.py
Expand Up @@ -1486,6 +1486,12 @@ def __init__(self,process, SelectEvents = untracked.PSet(), outputCommands = unt
self.__SelectEvents = SelectEvents
self.__outputCommands = outputCommands
# Need to remove MessageLogger from the subprocess now that MessageLogger is always present
if self.__process.MessageLogger is not MessageLogger:
print("""Warning: You have reconfigured service
'edm::MessageLogger' in a subprocess.
This service has already been configured.
This particular service may not be reconfigured in a subprocess.
The reconfiguration will be ignored.""")
del self.__process.MessageLogger
def dumpPython(self, options=PrintOptions()):
out = "parentProcess"+str(hash(self))+" = process\n"
Expand Down

0 comments on commit deafbcc

Please sign in to comment.