From 0d72fb9ed24ef5dbb1a6403b352e5ccda9b9434e Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Tue, 21 Nov 2023 07:24:16 +0100 Subject: [PATCH] Check for Lmod command in LMOD_CMD env variable --- machinestate.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/machinestate.py b/machinestate.py index c0d298b..00512b3 100755 --- a/machinestate.py +++ b/machinestate.py @@ -2981,6 +2981,8 @@ def __init__(self, extended=False, anonymous=False, modulecmd="modulecmd"): super(ModulesInfo, self).__init__(name="ModulesInfo", extended=extended, anonymous=anonymous) + if os.getenv("LMOD_CMD"): + modulecmd = os.getenv("LMOD_CMD") self.modulecmd = modulecmd parse = ModulesInfo.parsemodules cmd_opts = "sh -t list 2>&1"