Skip to content
Snippets Groups Projects
Commit 443ea780 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Merge branch 'exit.AthenaCommon-20200420' into 'master'

AthenaCommon: Python exit handler fix.

See merge request atlas/athena!32159
parents edc4446d 48ccb25a
No related branches found
No related tags found
No related merge requests found
......@@ -536,15 +536,17 @@ class AthAppMgr( AppMgr ):
# Likely the first (or at least the first important) place if we're
# running in compatibility mode where gaudimodule will be loaded. And
# even if not, still ok. Remove the gaudimodule exit handlers as to
# even if not, still ok. Remove the GaudiPython exit handlers as to
# prevent them from clobbering Athena ones.
# Don't remove exit handlers for GaudiConfig2, or we can get spurious
# errors on exit.
import atexit
handler = None
if hasattr(atexit, '_exithandlers'):
for handler in atexit._exithandlers[:]:
if hasattr(handler[0], '__module__') and handler[0].__module__:
if 'audi' in handler[0].__module__: # removes gaudimodule and GaudiPython handlers
#print "removed ", handler[0].__module__
if 'audiPython' in handler[0].__module__: # removes GaudiPython handlers
#print ("removed ", handler[0].__module__)
atexit._exithandlers.remove( handler )
del handler, atexit
......
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