From 99ffa554ebe092d0c2e7fd1ba8cdd23bacd85f12 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Tue, 18 Nov 2014 15:20:10 +0000 Subject: [PATCH] =?UTF-8?q?added=20=E2=80=981=5F*=E2=80=99=20to=20?= =?UTF-8?q?=E2=80=98*=E2=80=99=20as=20possible=20column=20label=20indicato?= =?UTF-8?q?r?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- processing/post/addIPFcolor.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/processing/post/addIPFcolor.py b/processing/post/addIPFcolor.py index c7509026c..41cf09e94 100755 --- a/processing/post/addIPFcolor.py +++ b/processing/post/addIPFcolor.py @@ -7,7 +7,7 @@ from optparse import OptionParser import damask scriptID = string.replace('$Id$','\n','\\n') -scriptName = scriptID.split()[1][:-3] +scriptName = os.path.splitext(scriptID.split()[1])[0] # -------------------------------------------------------------------- # MAIN @@ -98,12 +98,12 @@ for file in files: for datatype,info in datainfo.items(): for label in info['label']: - key = '1_'+label - if key not in table.labels: - file['croak'].write('column %s not found...\n'%key) + key = list(set([label, '1_'+label]) & set(table.labels)) + if key == []: + file['croak'].write('column %s not found...\n'%label) missingColumns = True # break if label not found else: - column[label] = table.labels.index(key) # remember columns of requested data + column[label] = table.labels.index(key[0]) # remember columns of requested data if missingColumns: continue