From 97ca57f806b37d8b065ce79c78d48745d46e0768 Mon Sep 17 00:00:00 2001 From: Johan Date: Tue, 1 Oct 2024 23:58:53 +0000 Subject: [PATCH] supress output of bsub on import --- ClusterWrap/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ClusterWrap/__init__.py b/ClusterWrap/__init__.py index adcedde..3744cea 100644 --- a/ClusterWrap/__init__.py +++ b/ClusterWrap/__init__.py @@ -5,7 +5,7 @@ cluster = local_cluster if which('bsub') is not None: - if os.system('bsub -V') != 32512: - cluster = janelia_lsf_cluster - - + test_version = os.system('bsub -V > /dev/null 2>&1') + # Check if version call was succesful (32512: fail, 512: Unknown option). + if (test_version != 32512) | (test_version != 512): + cluster = janelia_lsf_cluster \ No newline at end of file