From ec7122420f10d8c472d23806bb9f206a1bfa4ab1 Mon Sep 17 00:00:00 2001
From: Damian Alvarez <swmanage@jwlogin04.juwels>
Date: Tue, 5 Oct 2021 14:31:51 +0200
Subject: [PATCH] Corrected logic

---
 Custom_Hooks/eb_hooks.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Custom_Hooks/eb_hooks.py b/Custom_Hooks/eb_hooks.py
index 69112254e..530f02167 100644
--- a/Custom_Hooks/eb_hooks.py
+++ b/Custom_Hooks/eb_hooks.py
@@ -320,7 +320,7 @@ def pre_ready_hook(self, *args, **kwargs):
     override_toolchain_check = os.getenv("JSC_OVERRIDE_TOOLCHAIN_CHECK")
     if not override_toolchain_check:
         toolchain_name = toolchain["name"]
-        if not toolchain_name in SUPPORTED_TOOLCHAIN_FAMILIES and os.getenv('USER') is not 'swmanage':
+        if not toolchain_name in SUPPORTED_TOOLCHAIN_FAMILIES and os.getenv('USER') not in 'swmanage':
             stage = os.getenv("STAGE", default=None)
             if stage:
                 # Clean things up if it is a Devel stage
@@ -365,7 +365,7 @@ def pre_ready_hook(self, *args, **kwargs):
     # overridden, only experts should know that)
     override_mpi_check = os.getenv("JSC_OVERRIDE_MPI_CHECK")
     if not override_mpi_check:
-        if is_mpi and GOLDEN_REPO not in path_to_ec and os.getenv('USER') is not 'swmanage':
+        if is_mpi and GOLDEN_REPO not in path_to_ec and os.getenv('USER') not in 'swmanage':
             print_warning(
                 "\nYou are attempting to install a non-system MPI implementation (%s), "
                 "this is very likely to lead to severe performance degradation. Please "
-- 
GitLab