diff --git a/ganga/GangaLHCb/Lib/RTHandlers/GaudiExecRTHandlers.py b/ganga/GangaLHCb/Lib/RTHandlers/GaudiExecRTHandlers.py index 1820706a3e..36369b519e 100755 --- a/ganga/GangaLHCb/Lib/RTHandlers/GaudiExecRTHandlers.py +++ b/ganga/GangaLHCb/Lib/RTHandlers/GaudiExecRTHandlers.py @@ -792,6 +792,19 @@ def flush_streams(pipe): # Extract any/_all_ (b/g)zip files on the WN extractAllTarFiles('.') + runenv = dict() + result = subprocess.run(["bash", "-lc", + "source /cvmfs/lhcb.cern.ch/lib/LbEnv && printenv"], + capture_output=True, encoding='utf-8') + for line in result.stdout.split('\\n'): + varval = line.strip().split('=') + if len(varval) < 2: + pass + else: + content = ''.join(varval[1:]) + if not str(content).startswith('() {'): + runenv[varval[0]] = content + print("Executing: %s" % '###COMMAND###'+' '+' '.join(sys.argv[1:])) # Execute the actual command on the WN