Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
mesmith75 committed Dec 9, 2023
1 parent 3730101 commit bc6f3bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions ganga/GangaCore/Utility/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ def execute(command,

# This is where we store the output
thread_output = {}

if update_env:
env_output_key = 'env_output'
update_env_thread = update_thread(env_file_pipes, thread_output, env_output_key, require_output=True)
Expand Down
3 changes: 2 additions & 1 deletion ganga/GangaDirac/Lib/Utilities/DiracUtilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ def get_env(env_source):
dict: the environment
"""

logger.debug('Running DIRAC source command %s', env_source)
env = os.environ
gexecute.execute('source {0}'.format(env_source), shell=True, env=env, update_env=True)
Expand Down Expand Up @@ -220,6 +219,7 @@ def execute(command,
cred_req (ICredentialRequirement): What credentials does this call need
new_subprocess(bool): Do we want to do this in a fresh subprocess or just connect to the DIRAC server process?
"""

if cwd is None:
# We can in all likelyhood be in a temp folder on a shared (SLOW) filesystem
# If we are we do NOT want to execute commands which will involve any I/O on the system that isn't needed
Expand Down Expand Up @@ -279,6 +279,7 @@ def execute(command,
env['X509_USER_PROXY'] = credential_store[cred_req].location
if os.getenv('KRB5CCNAME'):
env['KRB5CCNAME'] = os.getenv('KRB5CCNAME')

returnable = gexecute.execute(command,
timeout=timeout,
env=env,
Expand Down

0 comments on commit bc6f3bb

Please sign in to comment.