From f20aff5ed96cf3843fe1a65a31e883809c6d5d24 Mon Sep 17 00:00:00 2001 From: Tomasz Date: Wed, 28 Oct 2015 15:48:56 +0100 Subject: [PATCH] Dont hang on qsub call, since it expects input --- SUSYBSMAnalysis/HSCP/python/LaunchOnCondor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SUSYBSMAnalysis/HSCP/python/LaunchOnCondor.py b/SUSYBSMAnalysis/HSCP/python/LaunchOnCondor.py index 75291b9b183b9..915a21e92c7cc 100644 --- a/SUSYBSMAnalysis/HSCP/python/LaunchOnCondor.py +++ b/SUSYBSMAnalysis/HSCP/python/LaunchOnCondor.py @@ -383,8 +383,8 @@ def SendCluster_Create(FarmDirectory, JobName): #determine what is the submission system available, or use condor if(subTool==''): - if( commands.getstatusoutput("bjobs")[1].find("command not found")<0): subTool = 'bsub' - elif(commands.getstatusoutput("qsub")[1].find("command not found")<0): subTool = 'qsub' + if( not commands.getstatusoutput("which bjobs")[1].startswith("which:")): subTool = 'bsub' + elif( not commands.getstatusoutput("which qsub")[1].startswith("which:")): subTool = 'qsub' else: subTool = 'condor' if(Jobs_Queue.find('crab')>=0): subTool = 'crab'