From 928307bad9bb38de6a88db049d9716d2e4776e63 Mon Sep 17 00:00:00 2001 From: Robert Edwards Date: Sat, 22 Sep 2018 11:30:52 -0400 Subject: [PATCH] Removed trailing newline in iterable read from listfile. --- jobtemplates/contract.jobs | 2 +- source/campaignSubmitter.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/jobtemplates/contract.jobs b/jobtemplates/contract.jobs index 60c917b..e6e0926 100644 --- a/jobtemplates/contract.jobs +++ b/jobtemplates/contract.jobs @@ -1 +1 @@ -{"campaign": "contractions", "jobtemplate": {"nodes": 1, "walltime": "00:30:00", "queuename": "ANALY_TJLAB_LQCD", "outputFile": "/scratch/fred", "command": " \n#!/bin/tcsh\necho \"hello world\"\nexit 0\n"}} \ No newline at end of file +{"campaign": "contractions", "jobtemplate": {"nodes": 1, "walltime": "00:30:00", "queuename": "ANALY_TJLAB_LQCD", "outputFile": "/scratch/fred", "command": "#!/bin/tcsh\necho \"hello world, this is \"\nexit 0\n"}} diff --git a/source/campaignSubmitter.py b/source/campaignSubmitter.py index 7a07b12..123d9ad 100644 --- a/source/campaignSubmitter.py +++ b/source/campaignSubmitter.py @@ -43,7 +43,8 @@ def submitCampaign(Session,campSpecFile,listFile): iterList = [] with open(listFile,'r') as f: for i in f: - iterList.append(i) + ii = re.sub("\n","",i) + iterList.append(ii) else: iterList = ['']