Skip to content

Commit

Permalink
Merge pull request #2349 from ganga-devs/platform_update
Browse files Browse the repository at this point in the history
Minor tidy
  • Loading branch information
mesmith75 authored May 21, 2024
2 parents 6ac6327 + ec140de commit 1a13d49
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ganga/GangaLHCb/Utility/LHCbDIRACenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,14 @@ def store_dirac_environment():
# except KeyError:
# logger.error("Environment variable %s is missing. Can't cache LHCbDIRAC environment.", platform_env_var)
# raise PluginError
# While LHCbDirac is only available for gcc49 we shall unfortunately hard-code the platform.
platform = 'x86_64-slc6-gcc49-opt'

requestedVersion = GangaCore.Utility.Config.getConfig('LHCb')['LHCbDiracVersion']

if not requestedVersion == 'prod':
logger.warn(
f"Specific DIRAC version ({requestedVersion}) is set in the [LHCb]LHCbDiracVersion configuration parameter. Unless you really know what you are doing, this should not be done.")

fdir = join(expanduser("~/.cache/Ganga/GangaLHCb"), platform)
fdir = expanduser("~/.cache/Ganga/GangaLHCb")
fname = join(fdir, requestedVersion)

cmd = (
Expand All @@ -50,7 +48,7 @@ def store_dirac_environment():
raise OptionValueError(f"LHCbDirac version {requestedVersion} does not exist")
try:
write_env_cache(env, fname)
logger.debug(f"Storing new LHCbDirac environment ({requestedVersion}:{platform})")
logger.debug(f"Storing new LHCbDirac environment ({requestedVersion})")
except (OSError, IOError, TypeError):
logger.error("Unable to store LHCbDirac environment")
raise PluginError
Expand Down

0 comments on commit 1a13d49

Please sign in to comment.