From acd10d36983a378eb860e5c740c6699c6e6f922d Mon Sep 17 00:00:00 2001 From: egede Date: Wed, 24 Apr 2024 07:19:56 +0000 Subject: [PATCH] autopep8 action fixes --- .../GangaLHCb/Lib/RTHandlers/GaudiExecRTHandlers.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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